1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

param: fix a bug where set_cmdline doesn't ignore the whitespace

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Garming Sam 2014-02-20 16:53:28 +13:00 committed by Jeremy Allison
parent e547e83fd3
commit b320953660

View File

@ -1612,15 +1612,14 @@ bool lpcfg_set_cmdline(struct loadparm_context *lp_ctx, const char *pszParmName,
int parmnum;
int i;
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);
while (isspace((unsigned char)*pszParmValue)) pszParmValue++;
if (parmnum < 0 && strchr(pszParmName, ':')) {
/* set a parametric option */
return lp_do_parameter_parametric(lp_ctx, NULL, pszParmName,