diff options
Diffstat (limited to 'source3/param')
-rw-r--r-- | source3/param/loadparm.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index c43a032560..58ea751fa5 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -2776,6 +2776,18 @@ BOOL lp_add_printer(const char *pszPrintername, int iDefaultService) return (True); } + +/*************************************************************************** + Check whether the given parameter name is valid. + Parametric options (names containing a colon) are considered valid. +***************************************************************************/ + +BOOL lp_parameter_valid(const char *pszParmName) +{ + return ((map_parameter(pszParmName) != -1) || + (strchr(pszParmName, ':') != NULL)); +} + /*************************************************************************** Map a parameter's string representation to something we can use. Returns False if the parameter string is not recognised, else TRUE. |