summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs/smbscript.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/ejs/smbscript.c')
-rw-r--r--source4/scripting/ejs/smbscript.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/scripting/ejs/smbscript.c b/source4/scripting/ejs/smbscript.c
index e00d52589a..a4f2e1cd43 100644
--- a/source4/scripting/ejs/smbscript.c
+++ b/source4/scripting/ejs/smbscript.c
@@ -53,10 +53,12 @@ int main(int argc, const char **argv)
fault_setup(argv[0]);
+ global_loadparm = lp_ctx = loadparm_init(talloc_autofree_context());
+
if (getenv("SMB_CONF_PATH")) {
- lp_load(talloc_autofree_context(), getenv("SMB_CONF_PATH"), &lp_ctx);
+ lp_load(lp_ctx, getenv("SMB_CONF_PATH"));
} else {
- lp_load(talloc_autofree_context(), dyn_CONFIGFILE, &lp_ctx);
+ lp_load(lp_ctx, dyn_CONFIGFILE);
}
ldb_global_init();