summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2014-02-28 10:16:05 +1300
committerAndrew Bartlett <abartlet@samba.org>2014-07-07 23:32:36 +0200
commita4f2f3a509ca7ce531c29e2761a3be2e43408b3f (patch)
tree64fbd6bbd684930c9c77863fa695ff48bf95917a
parent5a17187583f644bea743f1b2457a506c42de51b4 (diff)
downloadsamba-a4f2f3a509ca7ce531c29e2761a3be2e43408b3f.tar.gz
samba-a4f2f3a509ca7ce531c29e2761a3be2e43408b3f.tar.xz
samba-a4f2f3a509ca7ce531c29e2761a3be2e43408b3f.zip
param: allow fallback to s3 do_section in lib/param
This means that pm_process will eventually only call one do_section method. Change-Id: I81ffd0d61783df3e6c267f06210d4180a291ab4c Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
-rw-r--r--lib/param/loadparm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index d030d0b3eb..bda014319c 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. */