struct auth_serversupplied_info *copy_serverinfo(TALLOC_CTX *mem_ctx,
auth_serversupplied_info *src);
bool init_guest_info(void);
+bool server_info_set_session_key(struct auth_serversupplied_info *info,
+ DATA_BLOB session_key);
NTSTATUS make_server_info_guest(TALLOC_CTX *mem_ctx,
auth_serversupplied_info **server_info);
bool copy_current_user(struct current_user *dst, struct current_user *src);
NT_USER_TOKEN *get_root_nt_token( void );
NTSTATUS add_aliases(const DOM_SID *domain_sid,
struct nt_user_token *token);
+NTSTATUS create_builtin_users(const DOM_SID *sid);
+NTSTATUS create_builtin_administrators(const DOM_SID *sid);
struct nt_user_token *create_local_nt_token(TALLOC_CTX *mem_ctx,
const DOM_SID *user_sid,
bool is_guest,
void debug_unix_user_token(int dbg_class, int dbg_lev, uid_t uid, gid_t gid,
int n_groups, gid_t *groups);
-/* The following definitions come from dynconfig.c */
-
-const char *get_dyn_CONFIGFILE(void);
-const char *set_dyn_CONFIGFILE(const char *newpath);
-const char *get_dyn_LOGFILEBASE(void);
-const char *set_dyn_LOGFILEBASE(const char *newpath);
-const char *get_dyn_LMHOSTSFILE(void);
-const char *set_dyn_LMHOSTSFILE(const char *newpath);
-const char *get_dyn_CODEPAGEDIR(void);
-const char *set_dyn_CODEPAGEDIR(const char *newpath);
-const char *get_dyn_LIBDIR(void);
-const char *set_dyn_LIBDIR(const char *newpath);
-const char *get_dyn_SHLIBEXT(void);
-const char *set_dyn_SHLIBEXT(const char *newpath);
-const char *get_dyn_LOCKDIR(void);
-const char *set_dyn_LOCKDIR(const char *newpath);
-const char *get_dyn_PIDDIR(void);
-const char *set_dyn_PIDDIR(const char *newpath);
-const char *get_dyn_SMB_PASSWD_FILE(void);
-const char *set_dyn_SMB_PASSWD_FILE(const char *newpath);
-const char *get_dyn_PRIVATE_DIR(void);
-const char *set_dyn_PRIVATE_DIR(const char *newpath);
-const char *get_dyn_STATEDIR(void);
-const char *get_dyn_CACHEDIR(void);
-
/* The following definitions come from groupdb/mapping.c */
NTSTATUS add_initial_entry(gid_t gid, const char *sid, enum lsa_SidType sid_name_use, const char *nt_name, const char *comment);
/* The following definitions come from lib/access.c */
+bool client_match(const char *tok, const void *item);
+bool list_match(const char **list,const void *item,
+ bool (*match_fn)(const char *, const void *));
bool allow_access(const char **deny_list,
const char **allow_list,
const char *cname,
int debug_add_class(const char *classname);
int debug_lookup_classname(const char *classname);
bool debug_parse_levels(const char *params_str);
+void debug_message(struct messaging_context *msg_ctx, void *private_data, uint32_t msg_type, struct server_id src, DATA_BLOB *data);
void debug_init(void);
void debug_register_msgs(struct messaging_context *msg_ctx);
void setup_logging(const char *pname, bool interactive);
void setup_linklocal_scope_id(struct sockaddr_storage *pss);
bool is_local_net_v4(struct in_addr from);
int iface_count(void);
-int iface_count_v4(void);
+int iface_count_v4_nl(void);
const struct in_addr *first_ipv4_iface(void);
struct interface *get_interface(int n);
const struct sockaddr_storage *iface_n_sockaddr_storage(int n);
void TimeInit(void);
void get_process_uptime(struct timeval *ret_time);
time_t nt_time_to_unix_abs(const NTTIME *nt);
+time_t uint64s_nt_time_to_unix_abs(const uint64_t *src);
void unix_timespec_to_nt_time(NTTIME *nt, struct timespec ts);
void unix_to_nt_time_abs(NTTIME *nt, time_t t);
bool null_mtime(time_t mtime);
void set_cmdline_auth_info_password(const char *password);
bool set_cmdline_auth_info_signing_state(const char *arg);
int get_cmdline_auth_info_signing_state(void);
+void set_cmdline_auth_info_use_kerberos(bool b);
bool get_cmdline_auth_info_use_kerberos(void);
void set_cmdline_auth_info_use_krb5_ticket(void);
void set_cmdline_auth_info_smb_encrypt(void);
char *lock_path(const char *name);
char *pid_path(const char *name);
char *lib_path(const char *name);
+char *modules_path(const char *name);
char *data_path(const char *name);
char *state_path(const char *name);
const char *shlib_ext(void);
NTSTATUS split_ntfs_stream_name(TALLOC_CTX *mem_ctx, const char *fname,
char **pbase, char **pstream);
bool is_valid_policy_hnd(const POLICY_HND *hnd);
+bool policy_hnd_equal(const struct policy_handle *hnd1,
+ const struct policy_handle *hnd2);
const char *strip_hostname(const char *s);
/* The following definitions come from lib/util_file.c */
size_t *bufsize, const char *fmt, ...);
int asprintf_strupper_m(char **strp, const char *fmt, ...);
char *talloc_asprintf_strupper_m(TALLOC_CTX *t, const char *fmt, ...);
+char *talloc_asprintf_strlower_m(TALLOC_CTX *t, const char *fmt, ...);
char *sstring_sub(const char *src, char front, char back);
bool validate_net_name( const char *name,
const char *invalid_chars,
bool ads_sitename_match(ADS_STRUCT *ads);
bool ads_closest_dc(ADS_STRUCT *ads);
-bool ads_try_connect(ADS_STRUCT *ads, const char *server );
ADS_STATUS ads_connect(ADS_STRUCT *ads);
+ADS_STATUS ads_connect_user_creds(ADS_STRUCT *ads);
+ADS_STATUS ads_connect_gc(ADS_STRUCT *ads);
void ads_disconnect(ADS_STRUCT *ads);
ADS_STATUS ads_do_search_all_fn(ADS_STRUCT *ads, const char *bind_path,
int scope, const char *expr, const char **attrs,
char *ads_default_ou_string(ADS_STRUCT *ads, const char *wknguid);
ADS_STATUS ads_add_strlist(TALLOC_CTX *ctx, ADS_MODLIST *mods,
const char *name, const char **vals);
-uint32 ads_get_kvno(ADS_STRUCT *ads, const char *machine_name);
+uint32 ads_get_kvno(ADS_STRUCT *ads, const char *account_name);
+uint32_t ads_get_machine_kvno(ADS_STRUCT *ads, const char *machine_name);
ADS_STATUS ads_clear_service_principal_names(ADS_STRUCT *ads, const char *machine_name);
ADS_STATUS ads_add_service_principal_name(ADS_STRUCT *ads, const char *machine_name,
const char *my_fqdn, const char *spn);
bool all_zero(const uint8_t *ptr, size_t size);
void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid);
+bool ndr_syntax_id_equal(const struct ndr_syntax_id *i1,
+ const struct ndr_syntax_id *i2);
enum ndr_err_code ndr_push_server_id(struct ndr_push *ndr, int ndr_flags, const struct server_id *r);
enum ndr_err_code ndr_pull_server_id(struct ndr_pull *ndr, int ndr_flags, struct server_id *r);
void ndr_print_server_id(struct ndr_print *ndr, const char *name, const struct server_id *r);
NTSTATUS check_negative_conn_cache_timeout( const char *domain, const char *server, unsigned int failed_cache_timeout );
NTSTATUS check_negative_conn_cache( const char *domain, const char *server);
void add_failed_connection_entry(const char *domain, const char *server, NTSTATUS result) ;
+void delete_negative_conn_cache(const char *domain, const char *server);
void flush_negative_conn_cache( void );
void flush_negative_conn_cache_for_domain(const char *domain);
struct wkssvc_PasswordBuffer *pwd_buf,
DATA_BLOB *session_key,
char **pwd);
+DATA_BLOB decrypt_drsuapi_blob(TALLOC_CTX *mem_ctx,
+ const DATA_BLOB *session_key,
+ bool rcrypt,
+ uint32_t rid,
+ const DATA_BLOB *buffer);
/* The following definitions come from libsmb/smberr.c */
ssize_t vfswrap_flistxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size);
NTSTATUS vfs_default_init(void);
-/* The following definitions come from modules/vfs_posixacl.c */
-
-SMB_ACL_T posixacl_sys_acl_get_file(vfs_handle_struct *handle,
- const char *path_p,
- SMB_ACL_TYPE_T type);
-SMB_ACL_T posixacl_sys_acl_get_fd(vfs_handle_struct *handle,
- files_struct *fsp);
-int posixacl_sys_acl_set_file(vfs_handle_struct *handle,
- const char *name,
- SMB_ACL_TYPE_T type,
- SMB_ACL_T theacl);
-int posixacl_sys_acl_set_fd(vfs_handle_struct *handle,
- files_struct *fsp,
- SMB_ACL_T theacl);
-int posixacl_sys_acl_delete_def_file(vfs_handle_struct *handle,
- const char *path);
-NTSTATUS vfs_posixacl_init(void);
-
/* The following definitions come from nmbd/asyncdns.c */
int asyncdns_fd(void);
void reply_netbios_packet(struct packet_struct *orig_packet,
int rcode, enum netbios_reply_type_code rcv_code, int opcode,
int ttl, char *data,int len);
+void queue_packet(struct packet_struct *packet);
void run_packet_queue(void);
void retransmit_or_expire_response_records(time_t t);
bool listen_for_packets(bool run_election);
bool lp_winbind_normalize_names(void);
bool lp_winbind_rpc_only(void);
const char **lp_idmap_domains(void);
-const char **lp_idmap_backend(void);
+const char *lp_idmap_backend(void);
char *lp_idmap_alloc_backend(void);
int lp_idmap_cache_time(void);
int lp_idmap_negative_cache_time(void);
bool lp_wins_proxy(void);
bool lp_local_master(void);
bool lp_domain_logons(void);
+const char **lp_init_logon_delayed_hosts(void);
+int lp_init_logon_delay(void);
bool lp_load_printers(void);
bool lp_readraw(void);
bool lp_large_readwrite(void);
int lp_smb_encrypt(int );
char lp_magicchar(const struct share_params *p );
int lp_winbind_cache_time(void);
+int lp_winbind_reconnect_delay(void);
const char **lp_winbind_nss_info(void);
int lp_algorithmic_rid_base(void);
int lp_name_cache_timeout(void);
bool save_defaults,
bool add_ipc,
bool initialize_globals);
-void lp_resetnumservices(void);
int lp_numservices(void);
void lp_dump(FILE *f, bool show_defaults, int maxtoprint);
void lp_dump_one(FILE * f, bool show_defaults, int snum);
const char *full_name, int flags,
const char **ret_domain, const char **ret_name,
DOM_SID *ret_sid, enum lsa_SidType *ret_type);
+bool lookup_domain_name(TALLOC_CTX *mem_ctx,
+ const char *domain, const char *name, int flags,
+ const char **ret_domain, const char **ret_name,
+ DOM_SID *ret_sid, enum lsa_SidType *ret_type);
bool lookup_name_smbconf(TALLOC_CTX *mem_ctx,
const char *full_name, int flags,
const char **ret_domain, const char **ret_name,
bool nt_printing_getsec(TALLOC_CTX *ctx, const char *sharename, SEC_DESC_BUF **secdesc_ctr);
void map_printer_permissions(SEC_DESC *sd);
void map_job_permissions(SEC_DESC *sd);
-bool print_access_check(struct current_user *user, int snum, int access_type);
+bool print_access_check(struct auth_serversupplied_info *server_info, int snum,
+ int access_type);
bool print_time_access_check(const char *servicename);
char* get_server_name( Printer_entry *printer );
/* The following definitions come from printing/printfsp.c */
NTSTATUS print_fsp_open(connection_struct *conn, const char *fname,
- files_struct **result);
+ uint16_t current_vuid, files_struct **result);
void print_fsp_end(files_struct *fsp, enum file_close_type close_type);
/* The following definitions come from printing/printing.c */
NT_DEVICEMODE *print_job_devmode(const char* sharename, uint32 jobid);
bool print_job_set_place(const char *sharename, uint32 jobid, int place);
bool print_job_set_name(const char *sharename, uint32 jobid, char *name);
-bool print_job_delete(struct current_user *user, int snum, uint32 jobid, WERROR *errcode);
-bool print_job_pause(struct current_user *user, int snum, uint32 jobid, WERROR *errcode);
-bool print_job_resume(struct current_user *user, int snum, uint32 jobid, WERROR *errcode);
+bool print_job_delete(struct auth_serversupplied_info *server_info, int snum,
+ uint32 jobid, WERROR *errcode);
+bool print_job_pause(struct auth_serversupplied_info *server_info, int snum,
+ uint32 jobid, WERROR *errcode);
+bool print_job_resume(struct auth_serversupplied_info *server_info, int snum,
+ uint32 jobid, WERROR *errcode);
ssize_t print_job_write(int snum, uint32 jobid, const char *buf, SMB_OFF_T pos, size_t size);
int print_queue_length(int snum, print_status_struct *pstatus);
-uint32 print_job_start(struct current_user *user, int snum, char *jobname, NT_DEVICEMODE *nt_devmode );
+uint32 print_job_start(struct auth_serversupplied_info *server_info, int snum,
+ char *jobname, NT_DEVICEMODE *nt_devmode );
void print_job_endpage(int snum, uint32 jobid);
bool print_job_end(int snum, uint32 jobid, enum file_close_type close_type);
int print_queue_status(int snum,
print_queue_struct **ppqueue,
print_status_struct *status);
-bool print_queue_pause(struct current_user *user, int snum, WERROR *errcode);
-bool print_queue_resume(struct current_user *user, int snum, WERROR *errcode);
-bool print_queue_purge(struct current_user *user, int snum, WERROR *errcode);
+bool print_queue_pause(struct auth_serversupplied_info *server_info, int snum,
+ WERROR *errcode);
+bool print_queue_resume(struct auth_serversupplied_info *server_info, int snum,
+ WERROR *errcode);
+bool print_queue_purge(struct auth_serversupplied_info *server_info, int snum,
+ WERROR *errcode);
/* The following definitions come from printing/printing_db.c */
struct cli_pipe_auth_data *auth);
unsigned int rpccli_set_timeout(struct rpc_pipe_client *cli,
unsigned int timeout);
-bool rpccli_is_pipe_idx(struct rpc_pipe_client *cli, int pipe_idx);
bool rpccli_get_pwd_hash(struct rpc_pipe_client *cli, uint8_t nt_hash[16]);
struct cli_state *rpc_pipe_np_smb_conn(struct rpc_pipe_client *p);
NTSTATUS rpccli_anon_bind_data(TALLOC_CTX *mem_ctx,
NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, const char *socket_path,
const struct ndr_syntax_id *abstract_syntax,
struct rpc_pipe_client **presult);
-struct rpc_pipe_client *cli_rpc_pipe_open_noauth(struct cli_state *cli, int pipe_idx, NTSTATUS *perr);
-struct rpc_pipe_client *cli_rpc_pipe_open_ntlmssp(struct cli_state *cli,
- int pipe_idx,
- enum pipe_auth_level auth_level,
- const char *domain,
- const char *username,
- const char *password,
- NTSTATUS *perr);
-struct rpc_pipe_client *cli_rpc_pipe_open_spnego_ntlmssp(struct cli_state *cli,
- int pipe_idx,
- enum pipe_auth_level auth_level,
- const char *domain,
- const char *username,
- const char *password,
- NTSTATUS *perr);
-struct rpc_pipe_client *get_schannel_session_key(struct cli_state *cli,
- const char *domain,
- uint32 *pneg_flags,
- NTSTATUS *perr);
-struct rpc_pipe_client *cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli,
- int pipe_idx,
- enum pipe_auth_level auth_level,
- const char *domain,
- const struct dcinfo *pdc,
- NTSTATUS *perr);
-struct rpc_pipe_client *cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli,
- int pipe_idx,
- enum pipe_auth_level auth_level,
- const char *domain,
- const char *username,
- const char *password,
- NTSTATUS *perr);
-struct rpc_pipe_client *cli_rpc_pipe_open_schannel(struct cli_state *cli,
- int pipe_idx,
- enum pipe_auth_level auth_level,
- const char *domain,
- NTSTATUS *perr);
-struct rpc_pipe_client *cli_rpc_pipe_open_krb5(struct cli_state *cli,
- int pipe_idx,
- enum pipe_auth_level auth_level,
- const char *service_princ,
- const char *username,
- const char *password,
- NTSTATUS *perr);
+NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
+ const struct ndr_syntax_id *interface,
+ struct rpc_pipe_client **presult);
+NTSTATUS cli_rpc_pipe_open_ntlmssp(struct cli_state *cli,
+ const struct ndr_syntax_id *interface,
+ enum pipe_auth_level auth_level,
+ const char *domain,
+ const char *username,
+ const char *password,
+ struct rpc_pipe_client **presult);
+NTSTATUS cli_rpc_pipe_open_spnego_ntlmssp(struct cli_state *cli,
+ const struct ndr_syntax_id *interface,
+ enum pipe_auth_level auth_level,
+ const char *domain,
+ const char *username,
+ const char *password,
+ struct rpc_pipe_client **presult);
+NTSTATUS get_schannel_session_key(struct cli_state *cli,
+ const char *domain,
+ uint32 *pneg_flags,
+ struct rpc_pipe_client **presult);
+NTSTATUS cli_rpc_pipe_open_schannel_with_key(struct cli_state *cli,
+ const struct ndr_syntax_id *interface,
+ enum pipe_auth_level auth_level,
+ const char *domain,
+ const struct dcinfo *pdc,
+ struct rpc_pipe_client **presult);
+NTSTATUS cli_rpc_pipe_open_ntlmssp_auth_schannel(struct cli_state *cli,
+ const struct ndr_syntax_id *interface,
+ enum pipe_auth_level auth_level,
+ const char *domain,
+ const char *username,
+ const char *password,
+ struct rpc_pipe_client **presult);
+NTSTATUS cli_rpc_pipe_open_schannel(struct cli_state *cli,
+ const struct ndr_syntax_id *interface,
+ enum pipe_auth_level auth_level,
+ const char *domain,
+ struct rpc_pipe_client **presult);
+NTSTATUS cli_rpc_pipe_open_krb5(struct cli_state *cli,
+ const struct ndr_syntax_id *interface,
+ enum pipe_auth_level auth_level,
+ const char *service_princ,
+ const char *username,
+ const char *password,
+ struct rpc_pipe_client **presult);
+NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
+ struct rpc_pipe_client *cli,
+ DATA_BLOB *session_key);
+
/* The following definitions come from rpc_client/cli_reg.c */
NTSTATUS rpccli_samr_chgpasswd_user(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
- const char *username,
+ struct policy_handle *user_handle,
const char *newpassword,
const char *oldpassword);
+NTSTATUS rpccli_samr_chgpasswd_user2(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ const char *username,
+ const char *newpassword,
+ const char *oldpassword);
NTSTATUS rpccli_samr_chng_pswd_auth_crap(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *username,
DATA_BLOB old_nt_hash_enc_blob,
DATA_BLOB new_lm_password_blob,
DATA_BLOB old_lm_hash_enc_blob);
-NTSTATUS rpccli_samr_chgpasswd3(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx,
- const char *username,
- const char *newpassword,
- const char *oldpassword,
- struct samr_DomInfo1 **dominfo1,
- struct samr_ChangeReject **reject);
+NTSTATUS rpccli_samr_chgpasswd_user3(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ const char *username,
+ const char *newpassword,
+ const char *oldpassword,
+ struct samr_DomInfo1 **dominfo1,
+ struct samr_ChangeReject **reject);
void get_query_dispinfo_params(int loop_count, uint32 *max_entries,
uint32 *max_size);
NTSTATUS rpccli_try_samr_connects(struct rpc_pipe_client *cli,
void init_samr_user_info24(struct samr_UserInfo24 *r,
uint8_t data[516],
uint8_t pw_len);
+void init_samr_CryptPasswordEx(const char *pwd,
+ DATA_BLOB *session_key,
+ struct samr_CryptPasswordEx *pwd_buf);
+void init_samr_CryptPassword(const char *pwd,
+ DATA_BLOB *session_key,
+ struct samr_CryptPassword *pwd_buf);
/* The following definitions come from rpc_client/init_srvsvc.c */
/* The following definitions come from rpc_client/ndr.c */
NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx, int p_idx,
+ TALLOC_CTX *mem_ctx,
const struct ndr_interface_table *table,
uint32 opnum, void *r);
/* The following definitions come from rpc_parse/parse_rpc.c */
-const char *cli_get_pipe_name(int pipe_idx);
-int cli_get_pipe_idx(const RPC_IFACE *syntax);
+const char *cli_get_pipe_name_from_iface(TALLOC_CTX *mem_ctx,
+ struct cli_state *cli,
+ const struct ndr_syntax_id *interface);
void init_rpc_hdr(RPC_HDR *hdr, enum RPC_PKT_TYPE pkt_type, uint8 flags,
uint32 call_id, int data_len, int auth_len);
bool smb_io_rpc_hdr(const char *desc, RPC_HDR *rpc, prs_struct *ps, int depth);
bool setup_cancel_ack_reply(pipes_struct *p, prs_struct *rpc_in_p);
bool check_bind_req(struct pipes_struct *p, RPC_IFACE* abstract,
RPC_IFACE* transfer, uint32 context_id);
-NTSTATUS rpc_pipe_register_commands(int version, const char *clnt, const char *srv, const struct api_struct *cmds, int size);
+NTSTATUS rpc_pipe_register_commands(int version, const char *clnt,
+ const char *srv,
+ const struct ndr_syntax_id *interface,
+ const struct api_struct *cmds, int size);
+bool is_known_pipename(const char *cli_filename);
bool api_pipe_bind_req(pipes_struct *p, prs_struct *rpc_in_p);
bool api_pipe_alter_context(pipes_struct *p, prs_struct *rpc_in_p);
bool api_pipe_ntlmssp_auth_process(pipes_struct *p, prs_struct *rpc_in,
struct current_user *get_current_user(struct current_user *user, pipes_struct *p);
void free_pipe_rpc_context( PIPE_RPC_FNS *list );
bool api_pipe_request(pipes_struct *p);
-bool api_rpcTNP(pipes_struct *p, const char *rpc_name,
- const struct api_struct *api_rpc_cmds, int n_cmds);
-void get_pipe_fns( int idx, struct api_struct **fns, int *n_fns );
/* The following definitions come from rpc_server/srv_pipe_hnd.c */
void pipe_close_conn(connection_struct *conn);
smb_np_struct *get_rpc_pipe_p(uint16 pnum);
smb_np_struct *get_rpc_pipe(int pnum);
+struct pipes_struct *make_internal_rpc_pipe_p(const char *pipe_name,
+ const char *client_address,
+ struct auth_serversupplied_info *server_info,
+ uint16_t vuid);
+ssize_t read_from_internal_pipe(struct pipes_struct *p, char *data, size_t n,
+ bool *is_data_outstanding);
+ssize_t write_to_internal_pipe(struct pipes_struct *p, char *data, size_t n);
/* The following definitions come from rpc_server/srv_samr_nt.c */
bool conn_snum_used(int snum);
connection_struct *conn_find(unsigned cnum);
connection_struct *conn_new(void);
-void conn_close_all(void);
+bool conn_close_all(void);
bool conn_idle_all(time_t t);
-void conn_clear_vuid_cache(uint16 vuid);
+void conn_clear_vuid_caches(uint16 vuid);
void conn_free_internal(connection_struct *conn);
void conn_free(connection_struct *conn);
void msg_force_tdis(struct messaging_context *msg,
enum FAKE_FILE_TYPE is_fake_file(const char *fname);
NTSTATUS open_fake_file(connection_struct *conn,
+ uint16_t current_vuid,
enum FAKE_FILE_TYPE fake_file_type,
const char *fname,
uint32 access_mask,
/* The following definitions come from smbd/file_access.c */
bool can_access_file_acl(struct connection_struct *conn,
- const char * fname, SMB_STRUCT_STAT *psbuf,
+ const char * fname,
uint32_t access_mask);
bool can_delete_file_in_directory(connection_struct *conn, const char *fname);
bool can_access_file_data(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf, uint32 access_mask);
/* The following definitions come from smbd/ipc.c */
void send_trans_reply(connection_struct *conn,
- struct smb_request *req,
+ const uint8_t *inbuf,
char *rparam, int rparam_len,
char *rdata, int rdata_len,
bool buffer_too_large);
bool create_junction(TALLOC_CTX *ctx,
const char *dfs_path,
struct junction_map *jucn);
-bool create_msdfs_link(const struct junction_map *jucn,
- bool exists);
+bool create_msdfs_link(const struct junction_map *jucn);
bool remove_msdfs_link(const struct junction_map *jucn);
struct junction_map *enum_msdfs_links(TALLOC_CTX *ctx, size_t *p_num_jn);
NTSTATUS resolve_dfspath(TALLOC_CTX *ctx,
const char *name_in,
char **pp_name_out,
bool *ppath_contains_wcard);
+NTSTATUS create_conn_struct(TALLOC_CTX *ctx,
+ connection_struct **pconn,
+ int snum,
+ const char *path,
+ char **poldcwd);
/* The following definitions come from smbd/negprot.c */
void *private_data);
NTSTATUS allow_new_trans(struct trans_state *list, int mid);
void respond_to_all_remaining_local_messages(void);
+bool create_outbuf(TALLOC_CTX *mem_ctx, const char *inbuf, char **outbuf,
+ uint8_t num_words, uint32_t num_bytes);
void reply_outbuf(struct smb_request *req, uint8 num_words, uint32 num_bytes);
const char *smb_fn_name(int type);
void add_to_common_flags2(uint32 v);
int flags,
NTSTATUS *err);
bool check_fsp_open(connection_struct *conn, struct smb_request *req,
- files_struct *fsp, struct current_user *user);
+ files_struct *fsp);
bool check_fsp(connection_struct *conn, struct smb_request *req,
- files_struct *fsp, struct current_user *user);
+ files_struct *fsp);
+bool check_fsp_ntquota_handle(connection_struct *conn, struct smb_request *req,
+ files_struct *fsp);
bool fsp_belongs_conn(connection_struct *conn, struct smb_request *req,
- files_struct *fsp, struct current_user *user);
+ files_struct *fsp);
void reply_special(char *inbuf);
void reply_tcon(struct smb_request *req);
void reply_tcon_and_X(struct smb_request *req);
/* The following definitions come from smbd/uid.c */
bool change_to_guest(void);
+void conn_clear_vuid_cache(connection_struct *conn, uint16_t vuid);
bool change_to_user(connection_struct *conn, uint16 vuid);
bool change_to_root_user(void);
bool become_authenticated_pipe_user(pipes_struct *p);
/* The following definitions come from winbindd/idmap.c */
bool idmap_is_offline(void);
+bool idmap_is_online(void);
NTSTATUS smb_register_idmap(int version, const char *name,
struct idmap_methods *methods);
NTSTATUS smb_register_idmap_alloc(int version, const char *name,
struct idmap_alloc_methods *methods);
-NTSTATUS idmap_close(void);
+void idmap_close(void);
NTSTATUS idmap_init_cache(void);
-NTSTATUS idmap_init(void);
NTSTATUS idmap_allocate_uid(struct unixid *id);
NTSTATUS idmap_allocate_gid(struct unixid *id);
NTSTATUS idmap_set_uid_hwm(struct unixid *id);
NTSTATUS idmap_set_gid_hwm(struct unixid *id);
-NTSTATUS idmap_unixids_to_sids(struct id_map **ids);
-NTSTATUS idmap_sids_to_unixids(struct id_map **ids);
-NTSTATUS idmap_set_mapping(const struct id_map *id);
-char *idmap_fetch_secret(const char *backend, bool alloc,
- const char *domain, const char *identity);
+NTSTATUS idmap_backends_unixid_to_sid(const char *domname,
+ struct id_map *id);
+NTSTATUS idmap_backends_sid_to_unixid(const char *domname,
+ struct id_map *id);
+NTSTATUS idmap_new_mapping(const struct dom_sid *psid, enum id_type type,
+ struct unixid *pxid);
+NTSTATUS idmap_set_mapping(const struct id_map *map);
/* The following definitions come from winbindd/idmap_cache.c */
-struct idmap_cache_ctx *idmap_cache_init(TALLOC_CTX *memctx);
-NTSTATUS idmap_cache_set(struct idmap_cache_ctx *cache, const struct id_map *id);
-NTSTATUS idmap_cache_set_negative_sid(struct idmap_cache_ctx *cache, const struct id_map *id);
-NTSTATUS idmap_cache_set_negative_id(struct idmap_cache_ctx *cache, const struct id_map *id);
-NTSTATUS idmap_cache_map_sid(struct idmap_cache_ctx *cache, struct id_map *id);
-NTSTATUS idmap_cache_map_id(struct idmap_cache_ctx *cache, struct id_map *id);
+bool idmap_cache_find_sid2uid(const struct dom_sid *sid, uid_t *puid,
+ bool *expired);
+bool idmap_cache_find_uid2sid(uid_t uid, struct dom_sid *sid, bool *expired);
+void idmap_cache_set_sid2uid(const struct dom_sid *sid, uid_t uid);
+bool idmap_cache_find_sid2gid(const struct dom_sid *sid, gid_t *pgid,
+ bool *expired);
+bool idmap_cache_find_gid2sid(gid_t gid, struct dom_sid *sid, bool *expired);
+void idmap_cache_set_sid2gid(const struct dom_sid *sid, gid_t gid);
+
/* The following definitions come from winbindd/idmap_nss.c */
/* The following definitions come from winbindd/idmap_util.c */
-NTSTATUS idmap_uid_to_sid(DOM_SID *sid, uid_t uid);
-NTSTATUS idmap_gid_to_sid(DOM_SID *sid, gid_t gid);
-NTSTATUS idmap_sid_to_uid(DOM_SID *sid, uid_t *uid);
-NTSTATUS idmap_sid_to_gid(DOM_SID *sid, gid_t *gid);
+NTSTATUS idmap_uid_to_sid(const char *domname, DOM_SID *sid, uid_t uid);
+NTSTATUS idmap_gid_to_sid(const char *domname, DOM_SID *sid, gid_t gid);
+NTSTATUS idmap_sid_to_uid(const char *dom_name, DOM_SID *sid, uid_t *uid);
+NTSTATUS idmap_sid_to_gid(const char *domname, DOM_SID *sid, gid_t *gid);
/* The following definitions come from winbindd/nss_info.c */