s4-cmdline: moved loadparm init after fault setup
authorAndrew Tridgell <tridge@samba.org>
Tue, 29 Mar 2011 03:30:24 +0000 (14:30 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 29 Mar 2011 04:17:03 +0000 (06:17 +0200)
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/lib/cmdline/popt_common.c

index afc874226e558b17db98da3f753e2f650009818d..16c6a1b81bbc4a55243fdf9fbfc7c1c717212825 100644 (file)
@@ -83,8 +83,6 @@ static void popt_samba_callback(poptContext con,
                pname++;
 
        if (reason == POPT_CALLBACK_REASON_PRE) {
-               cmdline_lp_ctx = loadparm_init_global(false);
-
                /* Hook for 'almost the first thing to do in a samba program' here */
                /* setup for panics */
                fault_setup();
@@ -94,6 +92,7 @@ static void popt_samba_callback(poptContext con,
                talloc_set_log_fn(popt_s4_talloc_log_fn);
                talloc_set_abort_fn(smb_panic);
 
+               cmdline_lp_ctx = loadparm_init_global(false);
                return;
        }