summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2014-03-20 15:19:15 +1300
committerMichael Adam <obnox@samba.org>2014-07-31 08:17:10 +0200
commit3377c0f8a495905e289cf6698aff99d73741eb72 (patch)
tree0fa0b5d034e640ce5ac490d59ce50fd583e1a479 /source3
parent0864d4945e3c6a4b61cf54250ecb98a7844ee128 (diff)
downloadsamba-3377c0f8a495905e289cf6698aff99d73741eb72.tar.gz
samba-3377c0f8a495905e289cf6698aff99d73741eb72.tar.xz
samba-3377c0f8a495905e289cf6698aff99d73741eb72.zip
s3:param: add lp_ctx as a parameter to init_globals
Change-Id: I8804923241d782eb82675c5a56d53b5ba720fdf0 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/param/loadparm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 97e2ed1809..cbf372deec 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -630,7 +630,7 @@ static bool apply_lp_set_cmdline(void)
Initialise the global parameter structure.
***************************************************************************/
-static void init_globals(bool reinit_globals)
+static void init_globals(struct loadparm_context *lp_ctx, bool reinit_globals)
{
static bool done_init = false;
char *s = NULL;
@@ -3899,7 +3899,7 @@ static bool lp_load_ex(const char *pszFname,
lp_ctx->sDefault = &sDefault;
lp_ctx->bInGlobalSection = bInGlobalSection;
- init_globals(initialize_globals);
+ init_globals(lp_ctx, initialize_globals);
free_file_list();
@@ -3948,13 +3948,15 @@ static bool lp_load_ex(const char *pszFname,
* for config_backend. Otherwise, init_globals would
* send us into an endless loop here.
*/
- TALLOC_FREE(lp_ctx);
config_backend = CONFIG_BACKEND_REGISTRY;
/* start over */
DEBUG(1, ("lp_load_ex: changing to config backend "
"registry\n"));
- init_globals(true);
+ init_globals(lp_ctx, true);
+
+ TALLOC_FREE(lp_ctx);
+
lp_kill_all_services();
ok = lp_load_ex(pszFname, global_only, save_defaults,
add_ipc, initialize_globals,