1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

libsmbconf: move registry_smbconf_valname_forbidden() to the registry backend

from util_reg.c - no other callers left

Michael
(This used to be commit 98151fd3e1c24e5c8aaf3f5132071e91ac6ef257)
This commit is contained in:
Michael Adam 2008-04-08 22:51:02 +02:00
parent 7f0127a903
commit e06e8084c6
2 changed files with 22 additions and 22 deletions

View 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"
*/

View 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;
}