s3-loadparm: fixed re-application of cmdline parametric options
authorAndrew Tridgell <tridge@samba.org>
Tue, 26 Jul 2011 02:21:00 +0000 (12:21 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 8 Sep 2011 13:09:54 +0000 (15:09 +0200)
this ensures that cmdline parametric options are re-applied when we
reload smb.conf

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source3/param/loadparm.c

index 21fa662141bd69addc6f2ab8cbdba7081290c69c..3b5c4df35df7d2dc73ff6229f4751e2c8ce68aeb 100644 (file)
@@ -8989,7 +8989,10 @@ static bool lp_load_ex(const char *pszFname,
                lp_save_defaults();
        }
 
-       free_param_opts(&Globals.param_opt);
+       if (!initialize_globals) {
+               free_param_opts(&Globals.param_opt);
+               apply_lp_set_cmdline();
+       }
 
        lp_do_parameter(-1, "idmap config * : backend", Globals.szIdmapBackend);