diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-09-13 03:55:28 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:58:42 -0500 |
commit | 4456f87dee1b9ee130f290ba9b7fb61a89b72333 (patch) | |
tree | e040aa8ddde47d4f6512307a393515f86dd694fd /source4 | |
parent | a568462c5965adb7234a8ca70fe12c9b54778b63 (diff) | |
download | samba-4456f87dee1b9ee130f290ba9b7fb61a89b72333.tar.gz samba-4456f87dee1b9ee130f290ba9b7fb61a89b72333.tar.bz2 samba-4456f87dee1b9ee130f290ba9b7fb61a89b72333.zip |
r2306: in lp_set_cmdline(), also set any aliases as having been set by the commandline
(This used to be commit 2c0b5e119eddc6389500bcc80d1ae417dd9bfbb9)
Diffstat (limited to 'source4')
-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; } |