summaryrefslogtreecommitdiff
path: root/source4/param
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/param
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/param')
-rw-r--r--source4/param/loadparm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index be5464c8e6..9065a48113 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -2407,7 +2407,7 @@ bool loadparm_init(struct loadparm_context *lp_ctx)
_PUBLIC_ _DEPRECATED_ bool lp_load_default(void)
{
- return lp_load(dyn_CONFIGFILE);
+ return lp_load(dyn_CONFIGFILE, NULL);
}
/***************************************************************************
@@ -2415,13 +2415,16 @@ _PUBLIC_ _DEPRECATED_ bool lp_load_default(void)
False on failure.
***************************************************************************/
-bool lp_load(const char *filename)
+bool lp_load(const char *filename, struct loadparm_context **ret_lp)
{
char *n2;
bool bRetval;
struct param_opt *data;
struct loadparm_context *lp_ctx = &loadparm;
+ if (ret_lp != NULL)
+ *ret_lp = NULL;
+
filename = talloc_strdup(talloc_autofree_context(), filename);
global_loadparm = lp_ctx;
@@ -2470,6 +2473,9 @@ bool lp_load(const char *filename)
close_iconv();
+ if (ret_lp != NULL)
+ *ret_lp = lp_ctx;
+
return bRetval;
}