summaryrefslogtreecommitdiff
path: root/source4/utils
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/utils
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/utils')
-rw-r--r--source4/utils/testparm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/utils/testparm.c b/source4/utils/testparm.c
index 665c649e73..b9e6bc0595 100644
--- a/source4/utils/testparm.c
+++ b/source4/utils/testparm.c
@@ -184,6 +184,7 @@ static int do_share_checks(struct loadparm_context *lp_ctx, const char *cname, c
static const char *cname;
static const char *caddr;
static bool show_defaults = false;
+ struct loadparm_context *lp_ctx;
struct poptOption long_options[] = {
POPT_AUTOHELP
@@ -238,15 +239,15 @@ static int do_share_checks(struct loadparm_context *lp_ctx, const char *cname, c
fprintf(stderr, "Loaded smb config files from %s\n", lp_configfile(global_loadparm));
- if (!lp_load(lp_configfile(global_loadparm))) {
+ if (!lp_load(lp_configfile(global_loadparm), &lp_ctx)) {
fprintf(stderr,"Error loading services.\n");
return(1);
}
fprintf(stderr,"Loaded services file OK.\n");
- ret = do_global_checks(global_loadparm);
- ret |= do_share_checks(global_loadparm, cname, caddr, silent_mode, show_defaults, section_name, parameter_name);
+ ret = do_global_checks(lp_ctx);
+ ret |= do_share_checks(lp_ctx, cname, caddr, silent_mode, show_defaults, section_name, parameter_name);
return(ret);
}