param: fix lp_parameter_value_is_valid() for parametric options
authorRalph Wuerthner <ralph.wuerthner@de.ibm.com>
Mon, 28 Nov 2016 09:42:33 +0000 (10:42 +0100)
committerRalph Boehme <slow@samba.org>
Wed, 30 Nov 2016 03:00:54 +0000 (04:00 +0100)
Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Nov 30 04:00:54 CET 2016 on sn-devel-144

source3/param/loadparm.c

index 21073c6753ce5ea1d351ddfa21936ca406d845ec..dc551eb78ae1b4028669fbc5fd5fbefbff72b2ad 100644 (file)
@@ -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) {