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,