/* The following definitions come from auth/server_info.c */
+struct netr_SamInfo2;
+struct netr_SamInfo3;
+struct netr_SamInfo6;
+
struct auth_serversupplied_info *make_server_info(TALLOC_CTX *mem_ctx);
NTSTATUS serverinfo_to_SamInfo2(struct auth_serversupplied_info *server_info,
uint8_t *pipe_session_key,
size_t clistr_pull_talloc_fn(const char *function,
unsigned int line,
TALLOC_CTX *ctx,
- const char *inbuf,
+ const char *base,
+ uint16_t flags2,
char **pp_dest,
const void *src,
int src_len,
int flags);
size_t clistr_align_out(struct cli_state *cli, const void *p, int flags);
-size_t clistr_align_in(struct cli_state *cli, const void *p, int flags);
/* The following definitions come from libsmb/clitrans.c */
/* The following definitions come from libsmb/dsgetdcname.c */
+struct netr_DsRGetDCNameInfo;
+
void debug_dsdcinfo_flags(int lvl, uint32_t flags);
NTSTATUS dsgetdcname(TALLOC_CTX *mem_ctx,
struct messaging_context *msg_ctx,
/* The following definitions come from printing/load.c */
-void load_printers(void);
+void load_printers(struct tevent_context *ev,
+ struct messaging_context *msg_ctx);
/* The following definitions come from printing/lpq_parse.c */
int print_queue_snum(const char *qname);
void print_notify_send_messages(struct messaging_context *msg_ctx,
unsigned int timeout);
-void notify_printer_status_byname(const char *sharename, uint32 status);
-void notify_printer_status(int snum, uint32 status);
-void notify_job_status_byname(const char *sharename, uint32 jobid, uint32 status,
+void notify_printer_status_byname(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 status);
+void notify_printer_status(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ int snum, uint32 status);
+void notify_job_status_byname(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 jobid,
+ uint32 status,
uint32 flags);
-void notify_job_status(const char *sharename, uint32 jobid, uint32 status);
-void notify_job_total_bytes(const char *sharename, uint32 jobid,
+void notify_job_status(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 jobid, uint32 status);
+void notify_job_total_bytes(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 jobid,
uint32 size);
-void notify_job_total_pages(const char *sharename, uint32 jobid,
+void notify_job_total_pages(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 jobid,
uint32 pages);
-void notify_job_username(const char *sharename, uint32 jobid, char *name);
-void notify_job_name(const char *sharename, uint32 jobid, char *name);
-void notify_job_submitted(const char *sharename, uint32 jobid,
+void notify_job_username(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 jobid, char *name);
+void notify_job_name(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 jobid, char *name);
+void notify_job_submitted(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *sharename, uint32 jobid,
time_t submitted);
-void notify_printer_driver(int snum, const char *driver_name);
-void notify_printer_comment(int snum, const char *comment);
-void notify_printer_sharename(int snum, const char *share_name);
-void notify_printer_printername(int snum, const char *printername);
-void notify_printer_port(int snum, const char *port_name);
-void notify_printer_location(int snum, const char *location);
-void notify_printer_byname( const char *printername, uint32 change, const char *value );
+void notify_printer_driver(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ int snum, const char *driver_name);
+void notify_printer_comment(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ int snum, const char *comment);
+void notify_printer_sharename(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ int snum, const char *share_name);
+void notify_printer_printername(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ int snum, const char *printername);
+void notify_printer_port(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ int snum, const char *port_name);
+void notify_printer_location(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ int snum, const char *location);
+void notify_printer_byname(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
+ const char *printername, uint32 change,
+ const char *value);
/* The following definitions come from printing/pcap.c */
-void pcap_cache_reload(void);
+void pcap_cache_reload(struct tevent_context *ev,
+ struct messaging_context *msg_ctx);
bool pcap_printername_ok(const char *printername);
/* The following definitions come from printing/printing.c */
bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid);
void rap_jobid_delete(const char* sharename, uint32 jobid);
bool print_backend_init(struct messaging_context *msg_ctx);
-void start_background_queue(void);
+void start_background_queue(struct tevent_context *ev,
+ struct messaging_context *msg);
void printing_end(void);
/* The following definitions come from printing/printing_db.c */
struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
const struct ndr_syntax_id *syntax,
const char *client_address,
- struct auth_serversupplied_info *server_info);
-NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx, const struct ndr_syntax_id *abstract_syntax,
+ struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx);
+NTSTATUS rpc_pipe_open_internal(TALLOC_CTX *mem_ctx,
+ const struct ndr_syntax_id *abstract_syntax,
struct auth_serversupplied_info *serversupplied_info,
+ struct messaging_context *msg_ctx,
struct rpc_pipe_client **presult);
NTSTATUS rpc_connect_spoolss_pipe(connection_struct *conn,
struct rpc_pipe_client **spoolss_pipe);
const struct tsocket_address *local_address,
const struct tsocket_address *remote_address,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
struct fake_file_handle **phandle);
bool np_read_in_progress(struct fake_file_handle *handle);
struct tevent_req *np_write_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
uint32_t msg_type,
struct server_id server_id,
DATA_BLOB *data);
-void update_monitored_printq_cache( void );
+void update_monitored_printq_cache(struct messaging_context *msg_ctx);
void reset_all_printerdata(struct messaging_context *msg,
void *private_data,
uint32_t msg_type,
/* The following definitions come from smbd/process.c */
void smbd_setup_sig_term_handler(void);
-void smbd_setup_sig_hup_handler(void);
+void smbd_setup_sig_hup_handler(struct tevent_context *ev,
+ struct messaging_context *msg_ctx);
bool srv_send_smb(int fd, char *buffer,
bool no_signing, uint32_t seqnum,
bool do_encrypt,
size_t req_wct_ofs(struct smb_request *req);
void chain_reply(struct smb_request *req);
bool req_is_in_chain(struct smb_request *req);
-void check_reload(time_t t);
-void smbd_process(void);
+void smbd_process(struct smbd_server_connection *sconn);
/* The following definitions come from smbd/quotas.c */
struct event_context *smbd_event_context(void);
struct messaging_context *smbd_messaging_context(void);
struct memcache *smbd_memcache(void);
-void reload_printers(void);
-bool reload_services(bool test);
+void reload_printers(struct messaging_context *msg_ctx);
+bool reload_services(struct messaging_context *msg_ctx, bool test);
void exit_server(const char *const explanation);
void exit_server_cleanly(const char *const explanation);
void exit_server_fault(void);
char **pp_dirpath,
char **pp_start,
SMB_STRUCT_STAT *pst);
-void send_stat_cache_delete_message(const char *name);
+void send_stat_cache_delete_message(struct messaging_context *msg_ctx,
+ const char *name);
void stat_cache_delete(const char *name);
unsigned int fast_string_hash(TDB_DATA *key);
bool reset_stat_cache( void );
NTSTATUS idmap_init_cache(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_backends_unixid_to_sid(const char *domname,
struct id_map *id);