From 2d9b3020fad58f09c13b240bdfc6790ced77961a Mon Sep 17 00:00:00 2001 From: Garming Sam Date: Fri, 28 Feb 2014 11:09:24 +1300 Subject: param: attempt to start factoring out the bInGlobalSection parameter Eventually this parameter should be solely on the loadparm context. It should really only have meaning during the globals init. Change-Id: If0fd2037ce4e8399fbf00f63bc138d9c146d7570 Signed-off-by: Garming Sam Reviewed-by: Andrew Bartlett Reviewed-by: Nadezhda Ivanova --- source3/param/loadparm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/param') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index a0afa5d49a..40852968b9 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -2361,7 +2361,7 @@ static void init_iconv(void) ***************************************************************************/ static bool bAllowIncludeRegistry = true; -bool lp_include(struct loadparm_context *unused, int snum, const char *pszParmValue, char **ptr) +bool lp_include(struct loadparm_context *lp_ctx, int snum, const char *pszParmValue, char **ptr) { char *fname; @@ -2375,7 +2375,7 @@ bool lp_include(struct loadparm_context *unused, int snum, const char *pszParmVa if (!bAllowIncludeRegistry) { return true; } - if (bInGlobalSection) { + if (lp_ctx->bInGlobalSection) { bool ret; include_depth++; ret = process_registry_globals(); @@ -2646,6 +2646,7 @@ bool lp_do_parameter(int snum, const char *pszParmName, const char *pszParmValue loadparm_s3_helpers()); lp_ctx->sDefault = &sDefault; lp_ctx->services = ServicePtrs; + lp_ctx->bInGlobalSection = bInGlobalSection; ok = parm_table[parmnum].special(lp_ctx, snum, pszParmValue, (char **)parm_ptr); TALLOC_FREE(frame); -- cgit