The branch, master has been updated via 1e96da5 s3-param Fix lp_set_cmdline() to set the flag on alias values too from 58db821 Fix endianess problems as discovered on the build farm
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 1e96da556acc021ed296551f137d5600e2c1a58c Author: Andrew Bartlett <abart...@samba.org> Date: Sat Nov 27 08:17:09 2010 +1100 s3-param Fix lp_set_cmdline() to set the flag on alias values too Otherwise, -d10 would be overridden by 'debug level = 1', because debug level is an alias of 'log level' which -d was setting. Andrew Bartlett Autobuild-User: Andrew Bartlett <abart...@samba.org> Autobuild-Date: Sat Nov 27 01:02:40 CET 2010 on sn-devel-104 ----------------------------------------------------------------------- Summary of changes: source3/param/loadparm.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 31402cc..0bc27dc 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -7891,7 +7891,7 @@ FLAG_CMDLINE won't be overridden by loads from smb.conf. static bool lp_set_cmdline_helper(const char *pszParmName, const char *pszParmValue, bool store_values) { - int parmnum; + int parmnum, i; parmnum = map_parameter(pszParmName); if (parmnum >= 0) { parm_table[parmnum].flags &= ~FLAG_CMDLINE; @@ -7900,6 +7900,16 @@ static bool lp_set_cmdline_helper(const char *pszParmName, const char *pszParmVa } parm_table[parmnum].flags |= FLAG_CMDLINE; + /* we have to also set FLAG_CMDLINE on aliases. Aliases must + * be grouped in the table, so we don't have to search the + * whole table */ + 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; + } + if (store_values) { store_lp_set_cmdline(pszParmName, pszParmValue); } -- Samba Shared Repository