[PATCH 20/37] param: allow fallback to s3 do_section in lib/param
abartlet at samba.org
abartlet at samba.org
Fri Jun 20 05:47:42 MDT 2014
From: Garming Sam <garming at catalyst.net.nz>
This means that pm_process will eventually only call one do_section
method.
Change-Id: I81ffd0d61783df3e6c267f06210d4180a291ab4c
Signed-off-by: Garming Sam <garming at catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
---
lib/param/loadparm.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index 3123f71..23309ec 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -1899,8 +1899,15 @@ static bool do_section(const char *pszSectionName, void *userdata)
{
struct loadparm_context *lp_ctx = (struct loadparm_context *)userdata;
bool bRetval;
- bool isglobal = ((strwicmp(pszSectionName, GLOBAL_NAME) == 0) ||
+ bool isglobal;
+
+ if (lp_ctx->s3_fns != NULL) {
+ return lp_ctx->s3_fns->do_section(pszSectionName, lp_ctx);
+ }
+
+ isglobal = ((strwicmp(pszSectionName, GLOBAL_NAME) == 0) ||
(strwicmp(pszSectionName, GLOBAL_NAME2) == 0));
+
bRetval = false;
/* if we've just struck a global section, note the fact. */
--
1.9.3
More information about the samba-technical
mailing list