The branch, master has been updated
       via  fdc9a32 param: Amend docs.py test to check dumping of flagged 
parameters
       via  cafe296 param: remove idmap parameters as special cases in docs.py
       via  0eacbb6 param: change snum parameter in special functions to a 
loadparm_service pointer
       via  9f519ca s3:param: pass down lp_ctx in handle include
       via  76001ab lib/param: rename do_parameter to lpcfg_do_parameter
       via  e87cb83 param: handle smb_ports as a special handler
       via  8947af1 param: Use set_variable instead of set_variable_helper in 
lp_do_parameter
       via  21d5c66 param: add failure case for loadparm_init_s3
       via  8628481 param: store the flags_list in the s3 lp context used for 
special
       via  c76a8a1 param: mark non default options using flags in s3
       via  edc321d param: fix FLAG_CMDLINE to be stored outside of the param 
table
       via  124140f param: remove unnecessary dump a service
       via  e1c50d9 param: simplify lp_do_parameter
       via  39fb65e param: replace lp_set_cmdline in s3 helpers to store_cmdline
       via  85f5f86 param: Ensure the correct mem context is always being used 
from s3
       via  288e29b param: set the flags on a s3 loadparm context
       via  090fb5a param: flag fixes in s3 loadparm
       via  2d9b302 param: attempt to start factoring out the bInGlobalSection 
parameter
       via  a4f2f3a param: allow fallback to s3 do_section in lib/param
       via  5a17187 param: add do_section to s3 helpers
       via  acc7f79 param: rename do_section in s3 to lp_do_section to avoid 
conflicts
       via  5c0ce80 param: remove unnecessary calls to do_parameter in s3
       via  83bc583 lib/param: add deprecated warning to be consistent with s3
       via  ee722f4 param: remove unnecessary lp_local_ptr_by_snum function
       via  6ad9333 param: avoid the use of lp_do_parameter in popt
       via  bdbafe5 param: move defaults_saved global out of dump_globals 
function
       via  f1c28fc param: use set_variable_helper in s3 loadparm
       via  5b5e3ec param: finish the set_param_helper lineup by rearranging 
case order
       via  bc810ee param: make some more changes to lp_do_parameter to match 
set_variable_helper
       via  5da04ac lib/param: change set_variable_helper formatting
       via  f47df32 param: attempt to align the set_variable_helper with 
lp_do_parameter
       via  867ed27 param: use str_list_make_v3 instead of str_list_make in s3
       via  cafd607 param: Add null checks for upcoming str_list_make changes
       via  72651f9 param: pre-emptively correct use of str_list_make_v3 in 
lib/param
       via  e9a2694 lib/param: factor out a common portion of set_variable
       via  eda92c7 param: Use the plus/minus syntax for reading in lists in s3 
loadparm
       via  93448f4 param: change a number of parameters from P_LIST to 
P_CMDLIST
       via  d6486cf param: ensure CMD_LIST is freed when freeing a parameter
      from  49b500a smbcacls: parse config file argument prior to load

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit fdc9a322b1e346fe95dc59749f3c77d6ff27d7de
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Jul 3 16:04:06 2014 +1200

    param: Amend docs.py test to check dumping of flagged parameters
    
    This test uses an empty smb.conf file to check if the resulting
    output from testparm is empty.
    
    It also sets a parameter as default in an smb.conf file and then
    sets the option on the command line to ensure they are displayed
    correctly.
    
    Change-Id: I48f05b6e3c9e5cd856e89b196e00ae35eb93bf9f
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abart...@samba.org>
    Autobuild-Date(master): Tue Jul  8 01:57:59 CEST 2014 on sn-devel-104

commit cafe2966a00061732e72ffb37c1d7a338152171b
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Tue May 6 16:21:50 2014 +1200

    param: remove idmap parameters as special cases in docs.py
    
    Change-Id: Ie2395ddbe9e055b9972fd859615a022d9f675014
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 0eacbb6c960da27a12487ae74ca8a53274e416f3
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Mar 20 12:57:22 2014 +1300

    param: change snum parameter in special functions to a loadparm_service 
pointer
    
    Using either an snum or the current service for special functions
    depending where it was called is unnecessary and complicates the process
    of handling them generically.
    
    idmap parameters now call lpcfg_do_parameter_parametric and are now set
    like normal.
    
    Change-Id: I3eca89791274280f9d3c7b987fbd790c16ec7981
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 9f519cabfadf0025eefafb938045f9f849cdf3bc
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Mar 20 11:30:39 2014 +1300

    s3:param: pass down lp_ctx in handle include
    
    Currently the lp_ctx will never actually be used as it will still go
    through the current s3 code.
    
    Change-Id: Iff236aea79b2294deb8faf175c7425d075a0f4c4
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 76001abf7439f8f46ed82ae8c8795967463d2d83
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Mar 20 11:00:11 2014 +1300

    lib/param: rename do_parameter to lpcfg_do_parameter
    
    This should be used to allow it to be called from s3 code.
    
    Change-Id: I2f2d5526cf11a1ad78ca6ff7cb5c18fa25a98c76
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit e87cb83b472a4906e0bd27a6a6fee3c8387a7567
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Fri Mar 14 10:27:54 2014 +1300

    param: handle smb_ports as a special handler
    
    Avoids some problems with using str_list_make and str_list_make_v3 and 
tries to
    verify if the ports assignment is reasonable
    
    Change-Id: I441c4cca605c7548a5023b65994004fbac57d2df
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 8947af1bd20638114a32631986325e013bfa0104
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Fri Feb 28 11:58:55 2014 +1300

    param: Use set_variable instead of set_variable_helper in lp_do_parameter
    
    This extends the usage of the temporary s3 context in lp_do_parameter
    to beyond the special functions.
    
    At least for now, this will be necessary for sorting out the
    differences between the do_parameter code.
    
    Change-Id: Iac380d11a927e466ab1a56d34cebe343c3608707
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 21d5c667d8538933e4b106394c4e06231813a2e8
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Fri Feb 28 11:38:51 2014 +1300

    param: add failure case for loadparm_init_s3
    
    It allocates memory, so it should be possible for it to fail.
    
    Change-Id: Ib24f9718fb88790de23b78435866b9e79fe8c705
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 86284815fa5a9ffaa783c30b69a098db843ee6ad
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Fri Feb 28 11:32:24 2014 +1300

    param: store the flags_list in the s3 lp context used for special
    
    Special function needs the flag list.
    
    Change-Id: I3c2f118704026913021e4399e89cc3583de9a743
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit c76a8a1ba5fcf8df898f68839679444cd0e95362
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Wed Feb 26 17:11:24 2014 +1300

    param: mark non default options using flags in s3
    
    This change allows lib/param code to see which s3 parameters are
    currently set to defaults.
    
    Change-Id: Ic25b3f8e792a6d72705a7e5d7159ac8f87e18512
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit edc321df7f8bc8887f34e318f794a4a1690032f3
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Wed Feb 26 16:48:08 2014 +1300

    param: fix FLAG_CMDLINE to be stored outside of the param table
    
    In s3, flags could only be stored once in the param table and this was
    global. The param table defines only the default flags however.
    
    Change-Id: Ie673ad60dd499d930432c106e795e2cbd42d497b
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 124140f5d0fcfbbff732cc6855fea7edbfbba4ab
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Fri Feb 28 10:29:45 2014 +1300

    param: remove unnecessary dump a service
    
    Change-Id: I59b4edf929b4f8338e4c1a7116e0d1ef1bcad287
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit e1c50d9542a847361bcaf1bafca6691e56245873
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Feb 27 16:31:14 2014 +1300

    param: simplify lp_do_parameter
    
    No longer checks for globals vs service twice.
    
    Change-Id: I065e732ddb1ca2dda63dd22e3caf291fce8d327b
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 39fb65e54c4bf603c20ed01c1834b02e5be8c3c3
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Fri Feb 28 12:53:32 2014 +1300

    param: replace lp_set_cmdline in s3 helpers to store_cmdline
    
    Change-Id: I9a6ac66eeb8e0dd9ba356f5201f7ac09784b476d
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>

commit 85f5f8648c4f1b927ab114ea48a510e8c7004f76
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Wed Jun 11 09:56:20 2014 +1200

    param: Ensure the correct mem context is always being used from s3
    
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>
    Change-Id: I7b93822d0d06b00f08fecc2e55778767dd785b91

commit 288e29b7a9eeee59e85d0b26ca66dd1fc770c6a6
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Fri Feb 28 13:19:16 2014 +1300

    param: set the flags on a s3 loadparm context
    
    By setting up the flags when we initialize the context, the flags can be
    accessed by lib/param at any time.
    
    Change-Id: I60d4f3a9108560e204cf5f37da9c7d995939e146
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 090fb5a517377a5156f299799fadcd6ae7613f42
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Wed Feb 26 16:43:44 2014 +1300

    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 <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 2d9b3020fad58f09c13b240bdfc6790ced77961a
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Fri Feb 28 11:09:24 2014 +1300

    param: attempt to start factoring out the bInGlobalSection parameter
    
    Eventually this parameter should be solely on the loadparm context. It
    should really only have meaning during the globals init.
    
    Change-Id: If0fd2037ce4e8399fbf00f63bc138d9c146d7570
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit a4f2f3a509ca7ce531c29e2761a3be2e43408b3f
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Fri Feb 28 10:16:05 2014 +1300

    param: allow fallback to s3 do_section in lib/param
    
    This means that pm_process will eventually only call one do_section
    method.
    
    Change-Id: I81ffd0d61783df3e6c267f06210d4180a291ab4c
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 5a17187583f644bea743f1b2457a506c42de51b4
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Fri Feb 28 09:59:05 2014 +1300

    param: add do_section to s3 helpers
    
    Change-Id: Ib9cee580f46fcb6d5046e606b4bfbf9e68dab76a
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit acc7f79ee4f7bd26cae975cda8f859a6ae4e4df2
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Feb 27 17:18:26 2014 +1300

    param: rename do_section in s3 to lp_do_section to avoid conflicts
    
    Change-Id: I9bb090b3b501a1e958eec17988901baed16c58cb
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 5c0ce80726edf35b49fd0d94aede191da469e90a
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Feb 27 17:09:09 2014 +1300

    param: remove unnecessary calls to do_parameter in s3
    
    This aim of this is to try to factor out do_parameter.
    
    Ideally, do_parameter should strictly be called from pm_process.
    
    Change-Id: I990b53d0884e828f523a3b40e4ca72cc1596b06c
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 83bc583e80c1ca4a6f220e35ee24903f61e52455
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Feb 27 16:23:06 2014 +1300

    lib/param: add deprecated warning to be consistent with s3
    
    Change-Id: I79016279b8c5dce6263bff0477b808108e583d20
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit ee722f48c457ebbdd90a157ac4db12a8c4edb3b9
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Feb 27 16:27:56 2014 +1300

    param: remove unnecessary lp_local_ptr_by_snum function
    
    The function only appears twice and it can be easily inlined without
    any real loss to meaning or readability.
    
    Change-Id: Iabf6d202cedd95ad4f223e89c7d3be8dfbe36389
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 6ad9333784dc4d02e57548c08af07af4f62732a0
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Mar 20 09:44:59 2014 +1300

    param: avoid the use of lp_do_parameter in popt
    
    lp_do_parameter ideally should not be used outside of loadparm
    
    Change-Id: I310f1a0ff81867151accbda551751bafcdfd8c4d
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit bdbafe51daa1d338776b33197ba0fc53dc974827
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Wed Feb 26 15:46:06 2014 +1300

    param: move defaults_saved global out of dump_globals function
    
    Removes an unnecessary dependency on a global variable.
    
    Change-Id: I87fc63190a3b8ceba5fb5606fa0e7d5e1f2633a4
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit f1c28fcc23da3f4c8061d2db41fae90b14ca0494
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Tue May 6 16:11:08 2014 +1200

    param: use set_variable_helper in s3 loadparm
    
    Change-Id: I1ed19ee7290f6b52f624e2aa700cf402cfcb255d
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 5b5e3ec403dab81784402490e799d92999dc027f
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu May 8 12:13:21 2014 +1200

    param: finish the set_param_helper lineup by rearranging case order
    
    Attempting to make the code match exactly before moving it over.
    
    Change-Id: If05fccd11d245176b5793e59d1b92317b25fd2c8
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit bc810eed118ce10d54b9adbf4deff740c4bce6cf
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu May 8 12:10:53 2014 +1200

    param: make some more changes to lp_do_parameter to match 
set_variable_helper
    
    Attempting to make the code match exactly before moving it over.
    
    Change-Id: Ie7a30d5477f3fbf95f8f43e1ac1f76b581d87709
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 5da04ac4c52ec110064c47b8ea9eb12027e314cd
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu May 8 12:10:04 2014 +1200

    lib/param: change set_variable_helper formatting
    
    Attempting to make the code match exactly before moving it over.
    
    Change-Id: Id5571b00a8afd7dffc6197f2c7e020dd4fd59f85
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit f47df32fd144c9f306eda15c491a4ca5124dbe6e
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu May 8 11:57:28 2014 +1200

    param: attempt to align the set_variable_helper with lp_do_parameter
    
    This should allow some of it to be factored out into lib/param.
    
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>
    Change-Id: I7d0b3b4114c73aeaf9bf63e8c5fcd0a9d00cfc00

commit 867ed27ee976ba7c1d78523babe9246756a4ebb3
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Tue May 6 16:10:53 2014 +1200

    param: use str_list_make_v3 instead of str_list_make in s3
    
    Change-Id: Iea5aa39b9848bb19b0df3c70f249fd63bb61455e
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit cafd60732b833caba1e99afbd20be5339be3b4dc
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Fri Mar 14 09:30:52 2014 +1300

    param: Add null checks for upcoming str_list_make changes
    
    In changing str_list_make to str_list_make_v3, the list can be NULL.
    These are some additional checks to try to avoid any problems.
    
    Where lists are dealt with, they typically check both if the list is
    empty or the list is NULL.
    
    Change-Id: I9012c31dbd9832ce877728bcb3346616ba64c4c5
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 72651f92f0d35c026978e765cd9f8e0867c44af3
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Mar 13 13:27:24 2014 +1300

    param: pre-emptively correct use of str_list_make_v3 in lib/param
    
    lib/param uses str_list_make, while, s3 uses str_list_make_v3. These
    differ slightly and should be made the same.
    
    Notably it returns NULL when given a null or empty string
    
    Also, includes the null check in s3 code to be consistent for merging
    this section of code later on.
    
    Change-Id: Ib543a5a5307e06989621ea16bfe87e315d66a7ef
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit e9a2694e2b50e8be195ae7b22efd5ad9dc7b47e7
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Wed Feb 26 12:28:49 2014 +1300

    lib/param: factor out a common portion of set_variable
    
    Change-Id: Id8eeb480a377b4df8c3f51daf0d253f032fd0e83
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit eda92c7a3d7040be1fb46184f34fdb038eeeb3c7
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Tue Feb 25 18:14:44 2014 +1300

    param: Use the plus/minus syntax for reading in lists in s3 loadparm
    
    This changes the behaviour the following parameters:
    server services, dcerpc endpoint servers and ntvfs handler
    
    These parameters were introduced with samba4 and are the parameters
    which should utilize the newer list syntax. This allows merging
    between the setting of parameters.
    
    Change-Id: Id6226b5bede5cd4908f6718bd1b799faf881927d
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit 93448f4be92d4e018aaf2f9705f0351360b2ed0f
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Tue May 6 14:56:46 2014 +1200

    param: change a number of parameters from P_LIST to P_CMDLIST
    
    These parameters are being changed to use their original syntax to match 
source3.
    
    netbios aliases, interfaces, auth methods, invalid users, valid users,
    admin users, read list, write list, hosts allow, hosts deny, preload
    modules, smb ports, name resolve order, svcctl list, cluster addresses,
    init logon delayed hosts, wins server, eventlog list, usershare prefix
    allow list, usershare prefix deny list, vfs objects, winbind nss info
    
    The documentation has also been changed to be consistent with the
    change.
    
    Change-Id: I536481098a508e0366c910b180f2db6a6f0634a9
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

commit d6486cf0d2bb206dd20b4e5ee2e17f1e770eeea7
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu May 8 11:43:53 2014 +1200

    param: ensure CMD_LIST is freed when freeing a parameter
    
    As well as correctly deallocating the memory, this prevents a potential bug
    where s3 globals struct may be freed, but it can be referred to
    elsewhere.
    
    Change-Id: I92fc9baa26aee5b4a35b767bed901928cbb7c74f
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Nadezhda Ivanova <nivan...@samba.org>

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/smbdotconf/protocol/nameresolveorder.xml |    4 +-
 docs-xml/smbdotconf/protocol/smbports.xml         |    2 +-
 lib/param/loadparm.c                              |  258 +++++++++++++++------
 lib/param/loadparm.h                              |    8 +-
 lib/param/param_table.c                           |   52 ++--
 lib/param/s3_param.h                              |    7 +-
 lib/util/util_runcmd.c                            |    4 +
 lib/util/util_strlist.c                           |    4 +-
 python/samba/tests/docs.py                        |   78 ++++++-
 source3/lib/popt_common.c                         |    2 +-
 source3/param/loadparm.c                          |  246 +++++++++-----------
 source3/param/loadparm_ctx.c                      |    4 +-
 12 files changed, 422 insertions(+), 247 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/protocol/nameresolveorder.xml 
b/docs-xml/smbdotconf/protocol/nameresolveorder.xml
index 387bc9d..662c3fb 100644
--- a/docs-xml/smbdotconf/protocol/nameresolveorder.xml
+++ b/docs-xml/smbdotconf/protocol/nameresolveorder.xml
@@ -65,6 +65,6 @@
  
 </description>
 
-<value type="default">lmhosts, wins, host, bcast</value>
-<value type="example">lmhosts, bcast, host</value>
+<value type="default">lmhosts wins host bcast</value>
+<value type="example">lmhosts bcast host</value>
 </samba:parameter>
diff --git a/docs-xml/smbdotconf/protocol/smbports.xml 
b/docs-xml/smbdotconf/protocol/smbports.xml
index c5bec22..aaf4919 100644
--- a/docs-xml/smbdotconf/protocol/smbports.xml
+++ b/docs-xml/smbdotconf/protocol/smbports.xml
@@ -7,5 +7,5 @@
        <para>Specifies which ports the server should listen on for SMB 
traffic.</para>
 </description>
 
-<value type="default">445, 139</value>
+<value type="default">445 139</value>
 </samba:parameter>
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index c8f34e7..b58a058 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -70,8 +70,6 @@
 
 #define standard_sub_basic talloc_strdup
 
-static bool do_parameter(const char *, const char *, void *);
-
 #include "lib/param/param_global.h"
 
 struct loadparm_service *lpcfg_default_service(struct loadparm_context *lp_ctx)
@@ -233,6 +231,12 @@ static struct loadparm_service 
*lpcfg_getservicebyname(struct loadparm_context *
                                        const char *pszServiceName);
 static bool lpcfg_service_ok(struct loadparm_service *service);
 static bool do_section(const char *pszSectionName, void *);
+static bool set_variable_helper(TALLOC_CTX *mem_ctx, int parmnum, void 
*parm_ptr,
+                               const char *pszParmName, const char 
*pszParmValue);
+static bool lp_do_parameter_parametric(struct loadparm_context *lp_ctx,
+                                      struct loadparm_service *service,
+                                      const char *pszParmName,
+                                      const char *pszParmValue, int flags);
 
 /* The following are helper functions for parametrical options support. */
 /* It returns a pointer to parametrical option value if it exists or NULL 
otherwise */
@@ -543,7 +547,7 @@ bool lpcfg_string_set(TALLOC_CTX *mem_ctx, char **dest, 
const char *src)
  * Set a string value, deallocating any existing space, and allocing the space
  * for the string
  */
-static bool lpcfg_string_set_upper(TALLOC_CTX *mem_ctx, char **dest, const 
char *src)
+bool lpcfg_string_set_upper(TALLOC_CTX *mem_ctx, char **dest, const char *src)
 {
        talloc_free(*dest);
 
@@ -1069,7 +1073,7 @@ bool lp_set_enum_parm( struct parm_struct *parm, const 
char *pszParmValue,
  Handle the "realm" parameter
 ***************************************************************************/
 
-bool handle_realm(struct loadparm_context *lp_ctx, int unused,
+bool handle_realm(struct loadparm_context *lp_ctx, struct loadparm_service 
*service,
                  const char *pszParmValue, char **ptr)
 {
        char *upper;
@@ -1103,13 +1107,13 @@ bool handle_realm(struct loadparm_context *lp_ctx, int 
unused,
  Handle the include operation.
 ***************************************************************************/
 
-bool handle_include(struct loadparm_context *lp_ctx, int unused,
+bool handle_include(struct loadparm_context *lp_ctx, struct loadparm_service 
*service,
                           const char *pszParmValue, char **ptr)
 {
        char *fname;
 
        if (lp_ctx->s3_fns) {
-               return lp_ctx->s3_fns->lp_include(lp_ctx, unused, pszParmValue, 
ptr);
+               return lp_ctx->s3_fns->lp_include(lp_ctx, service, 
pszParmValue, ptr);
        }
 
        fname = standard_sub_basic(lp_ctx, pszParmValue);
@@ -1119,7 +1123,7 @@ bool handle_include(struct loadparm_context *lp_ctx, int 
unused,
        lpcfg_string_set(lp_ctx, ptr, fname);
 
        if (file_exist(fname))
-               return pm_process(fname, do_section, do_parameter, lp_ctx);
+               return pm_process(fname, do_section, lpcfg_do_parameter, 
lp_ctx);
 
        DEBUG(2, ("Can't find include file %s\n", fname));
 
@@ -1130,37 +1134,31 @@ bool handle_include(struct loadparm_context *lp_ctx, 
int unused,
  Handle the interpretation of the copy parameter.
 ***************************************************************************/
 
-bool handle_copy(struct loadparm_context *lp_ctx, int snum,
+bool handle_copy(struct loadparm_context *lp_ctx, struct loadparm_service 
*service,
                        const char *pszParmValue, char **ptr)
 {
        bool bRetval;
        struct loadparm_service *serviceTemp = NULL;
-       struct loadparm_service *current = NULL;
 
        bRetval = false;
 
        DEBUG(3, ("Copying service from service %s\n", pszParmValue));
 
        serviceTemp = lpcfg_getservicebyname(lp_ctx, pszParmValue);
-       if (lp_ctx->s3_fns != NULL) {
-               current = lp_ctx->s3_fns->get_servicebynum(snum);
-       } else {
-               current = lp_ctx->currentService;
-       }
 
-       if (current == NULL) {
+       if (service == NULL) {
                DEBUG(0, ("Unable to copy service - invalid service 
destination"));
                return false;
        }
 
        if (serviceTemp != NULL) {
-               if (serviceTemp == current) {
+               if (serviceTemp == service) {
                        DEBUG(0, ("Can't copy service %s - unable to copy 
self!\n", pszParmValue));
                } else {
-                       copy_service(current,
+                       copy_service(service,
                                     serviceTemp,
-                                    current->copymap);
-                       lpcfg_string_set(current, ptr, pszParmValue);
+                                    service->copymap);
+                       lpcfg_string_set(service, ptr, pszParmValue);
 
                        bRetval = true;
                }
@@ -1173,7 +1171,7 @@ bool handle_copy(struct loadparm_context *lp_ctx, int 
snum,
        return bRetval;
 }
 
-bool handle_debug_list(struct loadparm_context *lp_ctx, int unused,
+bool handle_debug_list(struct loadparm_context *lp_ctx, struct 
loadparm_service *service,
                        const char *pszParmValue, char **ptr)
 {
        if (lp_ctx->s3_fns != NULL) {
@@ -1185,7 +1183,7 @@ bool handle_debug_list(struct loadparm_context *lp_ctx, 
int unused,
        return debug_parse_levels(pszParmValue);
 }
 
-bool handle_logfile(struct loadparm_context *lp_ctx, int unused,
+bool handle_logfile(struct loadparm_context *lp_ctx, struct loadparm_service 
*service,
                    const char *pszParmValue, char **ptr)
 {
        if (lp_ctx->s3_fns != NULL) {
@@ -1202,7 +1200,7 @@ bool handle_logfile(struct loadparm_context *lp_ctx, int 
unused,
  * These special charset handling methods only run in the source3 code.
  */
 
-bool handle_charset(struct loadparm_context *lp_ctx, int snum,
+bool handle_charset(struct loadparm_context *lp_ctx, struct loadparm_service 
*service,
                        const char *pszParmValue, char **ptr)
 {
        if (lp_ctx->s3_fns) {
@@ -1220,7 +1218,7 @@ bool handle_charset(struct loadparm_context *lp_ctx, int 
snum,
 
 }
 
-bool handle_dos_charset(struct loadparm_context *lp_ctx, int snum,
+bool handle_dos_charset(struct loadparm_context *lp_ctx, struct 
loadparm_service *service,
                        const char *pszParmValue, char **ptr)
 {
        bool is_utf8 = false;
@@ -1265,7 +1263,7 @@ bool handle_dos_charset(struct loadparm_context *lp_ctx, 
int snum,
        return lpcfg_string_set(lp_ctx, ptr, pszParmValue);
 }
 
-bool handle_printing(struct loadparm_context *lp_ctx, int snum,
+bool handle_printing(struct loadparm_context *lp_ctx, struct loadparm_service 
*service,
                            const char *pszParmValue, char **ptr)
 {
        static int parm_num = -1;
@@ -1280,11 +1278,11 @@ bool handle_printing(struct loadparm_context *lp_ctx, 
int snum,
        }
 
        if (lp_ctx->s3_fns) {
-               if ( snum < 0 ) {
+               if (service == NULL) {
                        s = lp_ctx->sDefault;
                        
lp_ctx->s3_fns->init_printer_values(lp_ctx->globals->ctx, s);
                } else {
-                       s = lp_ctx->services[snum];
+                       s = service;
                        lp_ctx->s3_fns->init_printer_values(s, s);
                }
        }
@@ -1292,7 +1290,8 @@ bool handle_printing(struct loadparm_context *lp_ctx, int 
snum,
        return true;
 }
 
-bool handle_ldap_debug_level(struct loadparm_context *lp_ctx, int snum, const 
char *pszParmValue, char **ptr)
+bool handle_ldap_debug_level(struct loadparm_context *lp_ctx, struct 
loadparm_service *service,
+                            const char *pszParmValue, char **ptr)
 {
        lp_ctx->globals->ldap_debug_level = lp_int(pszParmValue);
 
@@ -1302,7 +1301,8 @@ bool handle_ldap_debug_level(struct loadparm_context 
*lp_ctx, int snum, const ch
        return true;
 }
 
-bool handle_netbios_aliases(struct loadparm_context *lp_ctx, int snum, const 
char *pszParmValue, char **ptr)
+bool handle_netbios_aliases(struct loadparm_context *lp_ctx, struct 
loadparm_service *service,
+                           const char *pszParmValue, char **ptr)
 {
        TALLOC_FREE(lp_ctx->globals->netbios_aliases);
        lp_ctx->globals->netbios_aliases = (const char 
**)str_list_make_v3(lp_ctx->globals->ctx,
@@ -1318,31 +1318,76 @@ bool handle_netbios_aliases(struct loadparm_context 
*lp_ctx, int snum, const cha
  * idmap related parameters
  */
 
-bool handle_idmap_backend(struct loadparm_context *lp_ctx, int snum, const 
char *pszParmValue, char **ptr)
+bool handle_idmap_backend(struct loadparm_context *lp_ctx, struct 
loadparm_service *service,
+                         const char *pszParmValue, char **ptr)
 {
        if (lp_ctx->s3_fns) {
-               return lp_ctx->s3_fns->lp_do_parameter(snum, "idmap config * : 
backend", pszParmValue);
+               lp_do_parameter_parametric(lp_ctx, service, "idmap config * : 
backend",
+                                          pszParmValue, 0);
        }
 
-       return lpcfg_string_set(lp_ctx, ptr, pszParmValue);
+       return lpcfg_string_set(lp_ctx->globals->ctx, ptr, pszParmValue);
 }
 
-bool handle_idmap_uid(struct loadparm_context *lp_ctx, int snum, const char 
*pszParmValue, char **ptr)
+bool handle_idmap_uid(struct loadparm_context *lp_ctx, struct loadparm_service 
*service,
+                     const char *pszParmValue, char **ptr)
 {
        if (lp_ctx->s3_fns) {
-               return lp_ctx->s3_fns->lp_do_parameter(snum, "idmap config * : 
range", pszParmValue);
+               lp_do_parameter_parametric(lp_ctx, service, "idmap config * : 
range",
+                                          pszParmValue, 0);
        }
 
-       return lpcfg_string_set(lp_ctx, ptr, pszParmValue);
+       return lpcfg_string_set(lp_ctx->globals->ctx, ptr, pszParmValue);
 }
 
-bool handle_idmap_gid(struct loadparm_context *lp_ctx, int snum, const char 
*pszParmValue, char **ptr)
+bool handle_idmap_gid(struct loadparm_context *lp_ctx, struct loadparm_service 
*service,
+                     const char *pszParmValue, char **ptr)
 {
        if (lp_ctx->s3_fns) {
-               return lp_ctx->s3_fns->lp_do_parameter(snum, "idmap config * : 
range", pszParmValue);
+               lp_do_parameter_parametric(lp_ctx, service, "idmap config * : 
range",
+                                          pszParmValue, 0);
        }
 
-       return lpcfg_string_set(lp_ctx, ptr, pszParmValue);
+       return lpcfg_string_set(lp_ctx->globals->ctx, ptr, pszParmValue);
+}
+
+bool handle_smb_ports(struct loadparm_context *lp_ctx, struct loadparm_service 
*service,
+                     const char *pszParmValue, char **ptr)
+{
+       static int parm_num = -1;
+       int i;
+       const char **list;
+
+       if (!pszParmValue || !*pszParmValue) {
+               return false;
+       }
+
+       if (parm_num == -1) {
+               parm_num = lpcfg_map_parameter("smb ports");
+       }
+
+       if(!set_variable_helper(lp_ctx->globals->ctx, parm_num, ptr, "smb 
ports",
+                               pszParmValue)) {
+               return false;
+       }
+
+       list = lp_ctx->globals->smb_ports;
+       if (list == NULL) {
+               return false;
+       }
+
+       /* Check that each port is a valid integer and within range */
+       for (i = 0; list[i] != NULL; i++) {
+               char *end = NULL;
+               int port = 0;
+               port = strtol(list[i], &end, 10);
+               if (*end != '\0' || port <= 0 || port > 65535) {
+                       TALLOC_FREE(list);
+                       return false;
+               }
+       }
+
+       return true;
 }
 
 /***************************************************************************
@@ -1386,7 +1431,14 @@ static bool lp_do_parameter_parametric(struct 
loadparm_context *lp_ctx,
 
        if (service == NULL) {
                data = &lp_ctx->globals->param_opt;
-               mem_ctx = lp_ctx->globals;
+               /**
+                * s3 code cannot deal with parametric options stored on the 
globals ctx.
+                */
+               if (lp_ctx->s3_fns != NULL) {
+                       mem_ctx = NULL;
+               } else {
+                       mem_ctx = lp_ctx->globals->ctx;
+               }
        } else {
                data = &service->param_opt;
                mem_ctx = service;
@@ -1399,29 +1451,18 @@ static bool lp_do_parameter_parametric(struct 
loadparm_context *lp_ctx,
        return true;
 }
 
-static bool set_variable(TALLOC_CTX *mem_ctx, int parmnum, void *parm_ptr,
-                        const char *pszParmName, const char *pszParmValue,
-                        struct loadparm_context *lp_ctx, bool on_globals)
+static bool set_variable_helper(TALLOC_CTX *mem_ctx, int parmnum, void 
*parm_ptr,
+                        const char *pszParmName, const char *pszParmValue)
 {
        int i;
-       /* if it is a special case then go ahead */
-       if (parm_table[parmnum].special) {
-               bool ret;
-               ret = parm_table[parmnum].special(lp_ctx, -1, pszParmValue,
-                                                 (char **)parm_ptr);
-               if (!ret) {
-                       return false;
-               }
-               goto mark_non_default;
-       }
 
-       /* now switch on the type of variable it is */
+       /* switch on the type of variable it is */
        switch (parm_table[parmnum].type)
        {
                case P_BOOL: {
                        bool b;
                        if (!set_boolean(pszParmValue, &b)) {
-                               DEBUG(0, ("set_variable(%s): value is not "
+                               DEBUG(0, ("set_variable_helper(%s): value is 
not "
                                          "boolean!\n", pszParmValue));
                                return false;
                        }
@@ -1432,7 +1473,7 @@ static bool set_variable(TALLOC_CTX *mem_ctx, int 
parmnum, void *parm_ptr,
                case P_BOOLREV: {
                        bool b;
                        if (!set_boolean(pszParmValue, &b)) {
-                               DEBUG(0, ("set_variable(%s): value is not "
+                               DEBUG(0, ("set_variable_helper(%s): value is 
not "
                                          "boolean!\n", pszParmValue));
                                return false;
                        }
@@ -1466,7 +1507,7 @@ static bool set_variable(TALLOC_CTX *mem_ctx, int 
parmnum, void *parm_ptr,
                                }
                        }
 
-                       DEBUG(0, ("set_variable(%s): value is not "
+                       DEBUG(0, ("set_variable_helper(%s): value is not "
                                  "a valid size specifier!\n", pszParmValue));
                        return false;
                }
@@ -1474,13 +1515,18 @@ static bool set_variable(TALLOC_CTX *mem_ctx, int 
parmnum, void *parm_ptr,
                case P_CMDLIST:
                        TALLOC_FREE(*(char ***)parm_ptr);
                        *(const char * const **)parm_ptr
-                               = (const char * const *)str_list_make(mem_ctx,
-                                                                     
pszParmValue, NULL);
+                               = (const char * const 
*)str_list_make_v3(mem_ctx,
+                                                                        
pszParmValue, NULL);
                        break;
+
                case P_LIST:
                {
-                       char **new_list = str_list_make(mem_ctx,
+                       char **new_list = str_list_make_v3(mem_ctx,
                                                        pszParmValue, NULL);
+                       if (new_list == NULL) {
+                               break;
+                       }
+
                        for (i=0; new_list[i]; i++) {
                                if (*(const char ***)parm_ptr != NULL &&
                                    new_list[i][0] == '+' &&
@@ -1509,6 +1555,7 @@ static bool set_variable(TALLOC_CTX *mem_ctx, int 
parmnum, void *parm_ptr,
                        }
                        break;
                }
+
                case P_STRING:
                        lpcfg_string_set(mem_ctx, (char **)parm_ptr, 
pszParmValue);
                        break;
@@ -1527,6 +1574,33 @@ static bool set_variable(TALLOC_CTX *mem_ctx, int 
parmnum, void *parm_ptr,
                        break;
        }
 
+       return true;
+
+}
+
+bool set_variable(TALLOC_CTX *mem_ctx, struct loadparm_service *service, int 
parmnum, void *parm_ptr,
+                        const char *pszParmName, const char *pszParmValue,
+                        struct loadparm_context *lp_ctx, bool on_globals)
+{
+       int i;
+       bool ok;
+
+       /* if it is a special case then go ahead */
+       if (parm_table[parmnum].special) {
+               ok = parm_table[parmnum].special(lp_ctx, service, pszParmValue,
+                                                 (char **)parm_ptr);
+               if (!ok) {
+                       return false;
+               }
+               goto mark_non_default;
+       }
+
+       ok = set_variable_helper(mem_ctx, parmnum, parm_ptr, pszParmName, 
pszParmValue);
+
+       if (!ok) {
+               return false;
+       }
+
 mark_non_default:
        if (on_globals && (lp_ctx->flags[parmnum] & FLAG_DEFAULT)) {
                lp_ctx->flags[parmnum] &= ~FLAG_DEFAULT;
@@ -1562,9 +1636,14 @@ bool lpcfg_do_global_parameter(struct loadparm_context 
*lp_ctx,
                return true;
        }
 
+       if (parm_table[parmnum].flags & FLAG_DEPRECATED) {
+               DEBUG(1, ("WARNING: The \"%s\" option is deprecated\n",
+                         pszParmName));
+       }
+
        parm_ptr = lpcfg_parm_ptr(lp_ctx, NULL, &parm_table[parmnum]);
 
-       return set_variable(lp_ctx->globals, parmnum, parm_ptr,
+       return set_variable(lp_ctx->globals->ctx, NULL, parmnum, parm_ptr,
                            pszParmName, pszParmValue, lp_ctx, true);
 }
 
@@ -1590,6 +1669,11 @@ bool lpcfg_do_service_parameter(struct loadparm_context 
*lp_ctx,
                return true;
        }
 
+       if (parm_table[parmnum].flags & FLAG_DEPRECATED) {
+               DEBUG(1, ("WARNING: The \"%s\" option is deprecated\n",
+                         pszParmName));
+       }
+
        if (parm_table[parmnum].p_class == P_GLOBAL) {
                DEBUG(0,
                      ("Global parameter %s found in service section!\n",
@@ -1608,7 +1692,7 @@ bool lpcfg_do_service_parameter(struct loadparm_context 
*lp_ctx,
                    parm_table[i].p_class == parm_table[parmnum].p_class)
                        bitmap_clear(service->copymap, i);
 
-       return set_variable(service, parmnum, parm_ptr, pszParmName,
+       return set_variable(service, service, parmnum, parm_ptr, pszParmName,
                            pszParmValue, lp_ctx, false);
 }
 
@@ -1616,7 +1700,7 @@ bool lpcfg_do_service_parameter(struct loadparm_context 
*lp_ctx,
  * Process a parameter.
  */
 
-static bool do_parameter(const char *pszParmName, const char *pszParmValue,
+bool lpcfg_do_parameter(const char *pszParmName, const char *pszParmValue,
                         void *userdata)
 {
        struct loadparm_context *lp_ctx = (struct loadparm_context *)userdata;
@@ -1662,16 +1746,19 @@ bool lpcfg_set_cmdline(struct loadparm_context *lp_ctx, 
const char *pszParmName,
 
        while (isspace((unsigned char)*pszParmValue)) pszParmValue++;
 
-       if (lp_ctx->s3_fns) {
-               return lp_ctx->s3_fns->set_cmdline(pszParmName, pszParmValue);
-       }
-
        parmnum = lpcfg_map_parameter(pszParmName);
 
        if (parmnum < 0 && strchr(pszParmName, ':')) {
                /* set a parametric option */
-               return lp_do_parameter_parametric(lp_ctx, NULL, pszParmName,
-                                                 pszParmValue, FLAG_CMDLINE);
+               bool ok;
+               ok = lp_do_parameter_parametric(lp_ctx, NULL, pszParmName,
+                                               pszParmValue, FLAG_CMDLINE);
+               if (lp_ctx->s3_fns != NULL) {
+                       if (ok) {
+                               lp_ctx->s3_fns->store_cmdline(pszParmName, 
pszParmValue);


-- 
Samba Shared Repository

Reply via email to