[PATCH 21/37] param: attempt to start factoring out the bInGlobalSection parameter
abartlet at samba.org
abartlet at samba.org
Fri Jun 20 05:47:43 MDT 2014
From: Garming Sam <garming at catalyst.net.nz>
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 <garming at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
---
source3/param/loadparm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index ff3c30b..464e7c2 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);
--
1.9.3
More information about the samba-technical
mailing list