diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-11-11 13:56:44 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-11-11 03:39:23 +0000 |
commit | ee50bdd42f01bfcebb2e75a923a01fa1d18e5694 (patch) | |
tree | e8b8d514c60fad9b851e6de245aa493386852bac /source4/param | |
parent | 21fe96e8f9e1f3f3d047ed893633228c2aef881c (diff) | |
download | samba-ee50bdd42f01bfcebb2e75a923a01fa1d18e5694.tar.gz samba-ee50bdd42f01bfcebb2e75a923a01fa1d18e5694.tar.bz2 samba-ee50bdd42f01bfcebb2e75a923a01fa1d18e5694.zip |
s4-loadparm: fix the FLAG_DEFAULT settings on specially handled parameters
parameters with special handlers also need to clear the FLAG_DEFAULT
flag when set
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Nov 11 03:39:23 UTC 2010 on sn-devel-104
Diffstat (limited to 'source4/param')
-rw-r--r-- | source4/param/loadparm.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index 74b394e5fc..09d4f394d3 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -1627,9 +1627,13 @@ static bool set_variable(TALLOC_CTX *mem_ctx, int parmnum, void *parm_ptr, int i; /* if it is a special case then go ahead */ if (parm_table[parmnum].special) { - parm_table[parmnum].special(lp_ctx, pszParmValue, - (char **)parm_ptr); - return true; + bool ret; + ret = parm_table[parmnum].special(lp_ctx, pszParmValue, + (char **)parm_ptr); + if (!ret) { + return false; + } + goto mark_non_default; } /* now switch on the type of variable it is */ @@ -1701,6 +1705,7 @@ static bool set_variable(TALLOC_CTX *mem_ctx, int parmnum, void *parm_ptr, break; } +mark_non_default: if (on_globals && (lp_ctx->flags[parmnum] & FLAG_DEFAULT)) { lp_ctx->flags[parmnum] &= ~FLAG_DEFAULT; /* we have to also unset FLAG_DEFAULT on aliases */ |