summaryrefslogtreecommitdiff
path: root/source4/client
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-08 23:32:37 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:48:56 +0100
commitdd7e5ed88c48f4ee39e53be07c8839791e914e45 (patch)
treefca88a741257b2f5165f3762de6c44053888fc3e /source4/client
parent75ac6cd318ae58aacc77785ba93af50bfe354b63 (diff)
downloadsamba-dd7e5ed88c48f4ee39e53be07c8839791e914e45.tar.gz
r26352: Don't make lp_load create a new context.
(This used to be commit d0d5c1a823a6601292c061dba2b6f4bde2b9e3dd)
Diffstat (limited to 'source4/client')
-rw-r--r--source4/client/smbmount.c6
-rw-r--r--source4/client/smbspool.c4
2 files changed, 7 insertions, 3 deletions
diff --git a/source4/client/smbmount.c b/source4/client/smbmount.c
index b32bcf5b68d..0c1c330104b 100644
--- a/source4/client/smbmount.c
+++ b/source4/client/smbmount.c
@@ -897,7 +897,9 @@ static void parse_mount_smb(int argc, char **argv)
pstrcpy(username,getenv("LOGNAME"));
}
- if (!lp_load(talloc_autofree_context(), dyn_CONFIGFILE, &lp_ctx)) {
+ lp_ctx = global_loadparm = loadparm_init(talloc_autofree_context());
+
+ if (!lp_load(lp_ctx, dyn_CONFIGFILE)) {
fprintf(stderr, "Can't load %s - run testparm to debug it\n",
lp_config_file());
}
@@ -923,6 +925,6 @@ static void parse_mount_smb(int argc, char **argv)
}
strupper(my_netbios_name);
- init_mount(global_loadparm);
+ init_mount(lp_ctx);
return 0;
}
diff --git a/source4/client/smbspool.c b/source4/client/smbspool.c
index 0951fb2befe..80a11d5f2d8 100644
--- a/source4/client/smbspool.c
+++ b/source4/client/smbspool.c
@@ -177,7 +177,9 @@ static int smb_print(struct smbcli_state *, char *, FILE *);
setup_logging(argv[0], DEBUG_STDOUT);
- if (!lp_load(talloc_autofree_context(), dyn_CONFIGFILE, &lp_ctx)) {
+ global_loadparm = lp_ctx = loadparm_init(talloc_autofree_context());
+
+ if (!lp_load(lp_ctx, dyn_CONFIGFILE)) {
fprintf(stderr, "ERROR: Can't load %s - run testparm to debug it\n", lp_config_file());
return (1);
}