param: don't ignore some parameters when performing map_parameter
authorGarming Sam <garming@catalyst.net.nz>
Wed, 8 Jan 2014 01:29:36 +0000 (14:29 +1300)
committerMichael Adam <obnox@samba.org>
Wed, 29 Jan 2014 08:12:22 +0000 (09:12 +0100)
Only the -valid parameter is currently affected by this. There doesn't seem to be any reason why you shouldn't
be able to simply map the parameter and there are already existing checks, in dump_a_service for instance, where it
checks for the prefix anyways.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
lib/param/loadparm.c
source3/param/loadparm.c

index 669e42db73853ad8ada10221417ad3c369438eb2..b1477a22b1b096ad6a4f2e9843c97687bb74ee48 100644 (file)
@@ -806,9 +806,6 @@ static int map_parameter(const char *pszParmName)
 {
        int iIndex;
 
-       if (*pszParmName == '-')
-               return -1;
-
        for (iIndex = 0; parm_table[iIndex].label; iIndex++)
                if (strwicmp(parm_table[iIndex].label, pszParmName) == 0)
                        return iIndex;
index dd65b936ec70c7f306c1ea574d5f5dc2560b3f20..489a21fa0cb7d7d4bf5ae3911f04052ce360a0e0 100644 (file)
@@ -1974,9 +1974,6 @@ static int map_parameter(const char *pszParmName)
 {
        int iIndex;
 
-       if (*pszParmName == '-' && !strequal(pszParmName, "-valid"))
-               return (-1);
-
        for (iIndex = 0; parm_table[iIndex].label; iIndex++)
                if (strwicmp(parm_table[iIndex].label, pszParmName) == 0)
                        return (iIndex);