s3-smbd: Regroup some init functions.
authorAndreas Schneider <asn@samba.org>
Tue, 10 Aug 2010 10:28:46 +0000 (12:28 +0200)
committerSimo Sorce <idra@samba.org>
Fri, 13 Aug 2010 16:20:10 +0000 (12:20 -0400)
Signed-off-by: Simo Sorce <idra@samba.org>
source3/smbd/server.c

index c41ad6fbafd82979ef1badcfe40ea493de59bf52..90756e1df21a2e8e2199ce7719f57accb4d9397e 100644 (file)
@@ -1084,33 +1084,33 @@ extern void build_options(bool screen);
        if (!W_ERROR_IS_OK(registry_init_full()))
                exit(1);
 
+       if (!print_backend_init(smbd_messaging_context()))
+               exit(1);
+
 #if 0
        if (!init_svcctl_db())
                 exit(1);
 #endif
 
+       /* Open the share_info.tdb here, so we don't have to open
+          after the fork on every single connection.  This is a small
+          performance improvment and reduces the total number of system
+          fds used. */
+       if (!share_info_db_init()) {
+               DEBUG(0,("ERROR: failed to load share info db.\n"));
+               exit(1);
+       }
+
        if (!init_system_info()) {
                DEBUG(0,("ERROR: failed to setup system user info.\n"));
                return -1;
        }
 
-       if (!print_backend_init(smbd_messaging_context()))
-               exit(1);
-
        if (!init_guest_info()) {
                DEBUG(0,("ERROR: failed to setup guest info.\n"));
                return -1;
        }
 
-       /* Open the share_info.tdb here, so we don't have to open
-          after the fork on every single connection.  This is a small
-          performance improvment and reduces the total number of system
-          fds used. */
-       if (!share_info_db_init()) {
-               DEBUG(0,("ERROR: failed to load share info db.\n"));
-               exit(1);
-       }
-
        /* only start the background queue daemon if we are 
           running as a daemon -- bad things will happen if
           smbd is launched via inetd and we fork a copy of