summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source/registry/reg_smbconf.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/registry/reg_smbconf.c b/source/registry/reg_smbconf.c
index b17422fdcb3..3427645fa69 100644
--- a/source/registry/reg_smbconf.c
+++ b/source/registry/reg_smbconf.c
@@ -42,6 +42,19 @@ static int smbconf_fetch_values( const char *key, REGVAL_CTR *val )
static BOOL smbconf_store_values( const char *key, REGVAL_CTR *val )
{
+ int i;
+ int num_values = regval_ctr_numvals(val);
+
+ for (i=0; i < num_values; i++) {
+ REGISTRY_VALUE *theval = regval_ctr_specific_value(val, i);
+ const char *valname = regval_name(theval);
+
+ if (registry_smbconf_valname_forbidden(valname)) {
+ DEBUG(0, ("smbconf_store_values: value '%s' forbidden "
+ "in registry.\n", valname));
+ return False;
+ }
+ }
return regdb_ops.store_values(key, val);
}