[PATCH] net conf: add parameter value check to 'net conf setparm'
Jeremy Allison
jra at samba.org
Tue Nov 29 20:15:49 UTC 2016
On Mon, Nov 28, 2016 at 03:18:03PM +0100, Ralph Wuerthner wrote:
> Hi!
>
> Shame on me:
>
> 21ae887 ralph.wuerthner at de.ibm.com param: add
> lp_parameter_value_is_valid() function
>
> broke setting of parametric options. Please see attached patch to
> fix the regression.
>
>
> Regards
>
> Ralph Wuerthner
Reviewed-by: Jeremy Allison <jra at samba.org>
Can I get a second Team reviewer ?
> From 301af26924ae6d6788a1d25c76ae16770d0a37f6 Mon Sep 17 00:00:00 2001
> From: Ralph Wuerthner <ralph.wuerthner at de.ibm.com>
> Date: Mon, 28 Nov 2016 10:42:33 +0100
> Subject: [PATCH] param: fix lp_parameter_value_is_valid() for parametric
> options
>
> Signed-off-by: Ralph Wuerthner <ralph.wuerthner at de.ibm.com>
> ---
> source3/param/loadparm.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
> index 21073c6..dc551eb 100644
> --- a/source3/param/loadparm.c
> +++ b/source3/param/loadparm.c
> @@ -1885,6 +1885,12 @@ static bool lp_parameter_value_is_valid(const char *parm_name, const char *val)
> uint64_t tmp_int64 = 0;
> struct parm_struct *parm;
>
> + /* parametric options (parameter names containing a colon) cannot
> + be checked and are therefore considered valid. */
> + if (strchr(parm_name, ':') != NULL) {
> + return true;
> + }
> +
> if (num >= 0) {
> parm = &parm_table[num];
> switch (parm->type) {
> --
> 1.9.1
>
More information about the samba-technical
mailing list