]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmbconf: move registry_smbconf_valname_forbidden() to the registry backend
authorMichael Adam <obnox@samba.org>
Tue, 8 Apr 2008 20:51:02 +0000 (22:51 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 9 Apr 2008 23:29:00 +0000 (01:29 +0200)
from util_reg.c - no other callers left

Michael

source/lib/smbconf/smbconf_reg.c
source/lib/util_reg.c

index dada8eece02415a9e61b19f4a95419f4b8d3b58d..e8ce1f55a5e778db35c38924960ff7542d5a9248 100644 (file)
@@ -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"
  */
index a2a62973deaf456301e9e082f165d9dd4c8004d1..7366dcb2a7f147f4b9c44e23560ff10b2f12418e 100644 (file)
@@ -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;
-}