r277: fix the initialisation of subsystems for process model 'thread' and 'standard'
authorStefan Metzmacher <metze@samba.org>
Mon, 19 Apr 2004 11:21:50 +0000 (11:21 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:51:19 +0000 (12:51 -0500)
metze
(This used to be commit 3d01cf95ad8b065cd274bc0e544919c7c9336721)

source4/smbd/process.c
source4/smbd/server.c

index 183f0655dab3baa6d551fe7d35e6dfbb712677cc..d06fbf9a44af7820be785dd2d1dc51cbf0f78bb9 100644 (file)
@@ -70,6 +70,19 @@ void smbd_process_init(void)
        if (!init_change_notify())
                exit(1);
 
+       /* Setup the PASSDB subsystem */
+       if(!initialize_password_db(False))
+               exit(1);
+
+       talloc_destroy(mem_ctx);
+}
+
+void init_subsystems(void)
+{
+       /* Setup the PROCESS_MODEL subsystem */
+       if (!process_model_init())
+               exit(1);
+
        /* Setup the AUTH subsystem */
        if (!auth_init())
                exit(1);
@@ -77,8 +90,6 @@ void smbd_process_init(void)
        /* Setup the PASSDB subsystem */
        if (!passdb_init())
                exit(1);
-       if(!initialize_password_db(False))
-               exit(1);
 
        /* Setup the NTVFS subsystem */
        if (!ntvfs_init())
@@ -88,6 +99,4 @@ void smbd_process_init(void)
        if (!dcesrv_init())
                exit(1);
 
-       talloc_destroy(mem_ctx);
 }
-
index 90955ff6cb496b80ea5b2cd2eff63519d1389473..f32d6a07021957b6afbd76e72fdc1c3a8bf585ca 100644 (file)
@@ -196,8 +196,6 @@ static void setup_process_model(struct event_context *events,
 {
        const struct model_ops *ops;
 
-       process_model_init();
-
        ops = process_model_byname(model);
        if (!ops) {
                DEBUG(0,("Unknown process model '%s'\n", model));
@@ -343,6 +341,8 @@ static void setup_process_model(struct event_context *events,
        register_msg_pool_usage();
        register_dmalloc_msgs();
 
+       init_subsystems();
+
        setup_process_model(events, model);
 
        /* wait for events */