And finally IDMAP in 3_0
[tprouty/samba.git] / source3 / smbd / server.c
index 8ce20c87a431f6b0dbf017eec5bfb46e9e852a67..edc7b57ba3988f32c84fc2fe2dc3648af00ae488 100644 (file)
@@ -567,6 +567,9 @@ void exit_server(const char *reason)
 
        print_notify_send_messages(3); /* 3 second timeout. */
 
+       /* run all registered exit events */
+       smb_run_exit_events();
+
        /* delete our entry in the connections database. */
        yield_connection(NULL,"");
 
@@ -833,10 +836,13 @@ static BOOL init_structs(void )
        if (!init_registry())
                exit(1);
 
-       if (!idmap_init(lp_idmap_backend()))
+       if(!initialize_password_db(False))
                exit(1);
 
-       if(!initialize_password_db(False))
+       if (!idmap_init())
+               exit(1);
+
+       if (!idmap_init_wellknown_sids())
                exit(1);
 
        static_init_rpc;
@@ -871,10 +877,6 @@ static BOOL init_structs(void )
        if (!init_change_notify())
                exit(1);
 
-       /* Setup privileges database */
-       if (!privilege_init())
-               exit(1);
-
        /* re-initialise the timezone */
        TimeInit();