summaryrefslogtreecommitdiff
path: root/lib/param
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2014-02-26 16:43:44 +1300
committerAndrew Bartlett <abartlet@samba.org>2014-07-07 23:32:36 +0200
commit090fb5a517377a5156f299799fadcd6ae7613f42 (patch)
treecf3a79bbe454ecce49365c976b2947c31a54cb8a /lib/param
parent2d9b3020fad58f09c13b240bdfc6790ced77961a (diff)
downloadsamba-090fb5a517377a5156f299799fadcd6ae7613f42.tar.gz
param: flag fixes in s3 loadparm
In s3 loadparm, the flags are stored in the param table, while in lib/param, it is individual to a loadparm context. Change-Id: I23d72eeec6b935c1897b34b8fc49d5a9992f2993 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
Diffstat (limited to 'lib/param')
-rw-r--r--lib/param/loadparm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index bda014319cc..7e37e3507ed 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -2053,6 +2053,9 @@ void lpcfg_dump_a_service(struct loadparm_service * pService, struct loadparm_se
}
if (pService->param_opt != NULL) {
for (data = pService->param_opt; data; data = data->next) {
+ if (!show_defaults && (data->priority & FLAG_DEFAULT)) {
+ continue;
+ }
fprintf(f, "\t%s = %s\n", data->key, data->value);
}
}
@@ -2575,6 +2578,13 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
}
}
+ for (parm=lp_ctx->sDefault->param_opt; parm; parm=parm->next) {
+ if (!(parm->priority & FLAG_CMDLINE)) {
+ parm->priority |= FLAG_DEFAULT;
+ }
+ }
+
+
return lp_ctx;
}