From: Michael Adam Date: Tue, 8 Apr 2008 20:51:02 +0000 (+0200) Subject: libsmbconf: move registry_smbconf_valname_forbidden() to the registry backend X-Git-Tag: samba-3.3.0pre1~2789 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=98151fd3e1c24e5c8aaf3f5132071e91ac6ef257;p=thirdparty%2Fsamba.git libsmbconf: move registry_smbconf_valname_forbidden() to the registry backend from util_reg.c - no other callers left Michael --- diff --git a/source/lib/smbconf/smbconf_reg.c b/source/lib/smbconf/smbconf_reg.c index dada8eece02..e8ce1f55a5e 100644 --- a/source/lib/smbconf/smbconf_reg.c +++ b/source/lib/smbconf/smbconf_reg.c @@ -41,6 +41,28 @@ static struct reg_private_data *rpd(struct smbconf_ctx *ctx) return (struct reg_private_data *)(ctx->data); } +/* + * check whether a given value name is forbidden in registry (smbconf) + */ +bool registry_smbconf_valname_forbidden(const char *valname) +{ + /* hard code the list of forbidden names here for now */ + const char *forbidden_valnames[] = { + "lock directory", + "lock dir", + "config backend", + NULL + }; + const char **forbidden = NULL; + + for (forbidden = forbidden_valnames; *forbidden != NULL; forbidden++) { + if (strwicmp(valname, *forbidden) == 0) { + return true; + } + } + return false; +} + /** * Open a registry key specified by "path" */ diff --git a/source/lib/util_reg.c b/source/lib/util_reg.c index a2a62973dea..7366dcb2a7f 100644 --- a/source/lib/util_reg.c +++ b/source/lib/util_reg.c @@ -119,25 +119,3 @@ void normalize_dbkey(char *key) string_sub(key, "\\", "/", len+1); strupper_m(key); } - -/* - * check whether a given value name is forbidden in registry (smbconf) - */ -bool registry_smbconf_valname_forbidden(const char *valname) -{ - /* hard code the list of forbidden names here for now */ - const char *forbidden_valnames[] = { - "lock directory", - "lock dir", - "config backend", - NULL - }; - const char **forbidden = NULL; - - for (forbidden = forbidden_valnames; *forbidden != NULL; forbidden++) { - if (strwicmp(valname, *forbidden) == 0) { - return true; - } - } - return false; -}