process a sam sync message - not sure whether to do this here or
somewhere else
****************************************************************************/
-static void msg_sam_sync(int msg_type, pid_t pid, void *buf, size_t len)
+static void msg_sam_sync(int UNUSED(msg_type), pid_t UNUSED(pid),
+ void *UNUSED(buf), size_t UNUSED(len))
{
DEBUG(10, ("** sam sync message received, ignoring\n"));
}
static void decrement_smbd_process_count(void)
{
- int total_smbds;
+ int32 total_smbds;
if (lp_max_smbd_processes()) {
total_smbds = 0;
- tdb_change_int_atomic(conn_tdb_ctx(), "INFO/total_smbds", &total_smbds, -1);
+ tdb_change_int32_atomic(conn_tdb_ctx(), "INFO/total_smbds", &total_smbds, -1);
}
}
{
static int firsttime=1;
extern char *last_inbuf;
- extern auth_authsupplied_info *negprot_global_auth_info;
+ extern struct auth_context *negprot_global_auth_context;
if (!firsttime)
exit(0);
change_to_root_user();
DEBUG(2,("Closing connections\n"));
- free_auth_info(&negprot_global_auth_info);
+ if (negprot_global_auth_context) {
+ negprot_global_auth_context->free(&negprot_global_auth_context);
+ }
conn_close_all();
become_daemon();
}
+#if HAVE_SETPGID
+ /*
+ * If we're interactive we want to set our own process group for
+ * signal management.
+ */
+ if (interactive)
+ setpgid( (pid_t)0, (pid_t)0);
+#endif
+
if (!directory_exist(lp_lockdir(), NULL)) {
mkdir(lp_lockdir(), 0755);
}
if (!message_init()) {
exit(1);
}
+ register_msg_pool_usage();
/* Setup the main smbd so that we can get messages. */
claim_connection(NULL,"",MAXSTATUS,True);