diff options
Diffstat (limited to 'source4/param/loadparm.c')
-rw-r--r-- | source4/param/loadparm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index 7ae4a29483..33612e1732 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -2622,6 +2622,7 @@ static BOOL do_parameter(const char *pszParmName, const char *pszParmValue) BOOL lp_set_cmdline(const char *pszParmName, const char *pszParmValue) { int parmnum = map_parameter(pszParmName); + int i; if (parmnum < 0 && strchr(pszParmName, ':')) { /* set a parametric option */ @@ -2636,6 +2637,15 @@ BOOL lp_set_cmdline(const char *pszParmName, const char *pszParmValue) } parm_table[parmnum].flags |= FLAG_CMDLINE; + + /* we have to also set FLAG_CMDLINE on aliases */ + for (i=parmnum-1;i>=0 && parm_table[i].ptr == parm_table[parmnum].ptr;i--) { + parm_table[i].flags |= FLAG_CMDLINE; + } + for (i=parmnum+1;i<NUMPARAMETERS && parm_table[i].ptr == parm_table[parmnum].ptr;i++) { + parm_table[i].flags |= FLAG_CMDLINE; + } + return True; } |