summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-04 00:12:13 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:48:01 +0100
commitb038240ac72fa34a132eb52bda28bbb80f82c29e (patch)
tree8870bbb7b50ce698806bc0f2210204b98e38c19a /source4/scripting
parentfc2f06d31b6b52c5cbd83f34a34e5107649a5134 (diff)
downloadsamba-b038240ac72fa34a132eb52bda28bbb80f82c29e.tar.gz
samba-b038240ac72fa34a132eb52bda28bbb80f82c29e.tar.bz2
samba-b038240ac72fa34a132eb52bda28bbb80f82c29e.zip
r26275: return loadparm context in lp_load.
(This used to be commit d01f0f4c2037b531b3fd088060717f90e60471e9)
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/ejs/smbcalls_config.c4
-rw-r--r--source4/scripting/ejs/smbscript.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/source4/scripting/ejs/smbcalls_config.c b/source4/scripting/ejs/smbcalls_config.c
index 1c76757659..122d78ac20 100644
--- a/source4/scripting/ejs/smbcalls_config.c
+++ b/source4/scripting/ejs/smbcalls_config.c
@@ -187,7 +187,9 @@ static int ejs_lpSet(MprVarHandle eid, int argc, char **argv)
*/
static int ejs_lpReload(MprVarHandle eid, int argc, char **argv)
{
- bool ret = lp_load(lp_configfile(global_loadparm));
+ bool ret;
+
+ ret = lp_load(lp_configfile(global_loadparm), NULL);
if (ret) {
unload_interfaces();
}
diff --git a/source4/scripting/ejs/smbscript.c b/source4/scripting/ejs/smbscript.c
index db6e0eeb10..2bb67135ea 100644
--- a/source4/scripting/ejs/smbscript.c
+++ b/source4/scripting/ejs/smbscript.c
@@ -49,18 +49,19 @@ int main(int argc, const char **argv)
const char *fname;
struct MprVar *return_var;
int exit_status, i;
+ struct loadparm_context *lp_ctx;
fault_setup(argv[0]);
if (getenv("SMB_CONF_PATH")) {
- lp_load(getenv("SMB_CONF_PATH"));
+ lp_load(getenv("SMB_CONF_PATH"), &lp_ctx);
} else {
- lp_load(dyn_CONFIGFILE);
+ lp_load(dyn_CONFIGFILE, &lp_ctx);
}
ldb_global_init();
- gensec_init(global_loadparm);
+ gensec_init(lp_ctx);
mprSetCtx(mem_ctx);