diff options
Diffstat (limited to 'source4/param/loadparm.c')
-rw-r--r-- | source4/param/loadparm.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index 2d9af33325..c1a012474b 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -2427,13 +2427,19 @@ const char *lp_configfile(struct loadparm_context *lp_ctx) return lp_ctx->szConfigFile; } -bool lp_load_default(struct loadparm_context *lp_ctx) +const char *lp_default_path(void) { - const char *path; if (getenv("SMB_CONF_PATH")) - path = getenv("SMB_CONF_PATH"); + return getenv("SMB_CONF_PATH"); else - path = dyn_CONFIGFILE; + return dyn_CONFIGFILE; +} + +bool lp_load_default(struct loadparm_context *lp_ctx) +{ + const char *path; + + path = lp_default_path(); if (!file_exist(path)) { /* We allow the default smb.conf file to not exist, |