summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/cmdline/popt_common.c6
-rw-r--r--source4/param/loadparm.c5
2 files changed, 5 insertions, 6 deletions
diff --git a/source4/lib/cmdline/popt_common.c b/source4/lib/cmdline/popt_common.c
index 96d8b8b40a..563bc0f399 100644
--- a/source4/lib/cmdline/popt_common.c
+++ b/source4/lib/cmdline/popt_common.c
@@ -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 */
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index 6b8db0e7f5..201013609e 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -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);
}
/**