]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Move check of SMB_CONF_PATH to loadparm code.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 2 Nov 2008 15:46:32 +0000 (16:46 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 2 Nov 2008 15:46:32 +0000 (16:46 +0100)
source4/lib/cmdline/popt_common.c
source4/param/loadparm.c

index 96d8b8b40a1a7937490c0baa9fc8eaaad11e933c..563bc0f3995ee8249e67129e64cac06d00f20448 100644 (file)
@@ -23,7 +23,6 @@
 #include "version.h"
 #include "lib/cmdline/popt_common.h"
 #include "param/param.h"
-#include "dynconfig/dynconfig.h"
 
 /* Handle command line options:
  *             -d,--debuglevel 
@@ -63,10 +62,7 @@ static void popt_samba_callback(poptContext con,
 
        if (reason == POPT_CALLBACK_REASON_POST) {
                if (lp_configfile(cmdline_lp_ctx) == NULL) {
-                       if (getenv("SMB_CONF_PATH"))
-                               lp_load(cmdline_lp_ctx, getenv("SMB_CONF_PATH"));
-                       else
-                               lp_load(cmdline_lp_ctx, dyn_CONFIGFILE);
+            lp_load_default(cmdline_lp_ctx);
                }
                /* Hook any 'every Samba program must do this, after
                 * the smb.conf is setup' functions here */
index 6b8db0e7f54f26313bc593c4179126cb2286b566..201013609eb5cf2a8e2cb4f2d8e76ecce7e3321f 100644 (file)
@@ -2431,7 +2431,10 @@ const char *lp_configfile(struct loadparm_context *lp_ctx)
 
 bool lp_load_default(struct loadparm_context *lp_ctx)
 {
-       return lp_load(lp_ctx, dyn_CONFIGFILE);
+    if (getenv("SMB_CONF_PATH"))
+        return lp_load(lp_ctx, getenv("SMB_CONF_PATH"));
+    else
+        return lp_load(lp_ctx, dyn_CONFIGFILE);
 }
 
 /**