summaryrefslogtreecommitdiff
path: root/source3/lib/smbconf
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/smbconf')
-rw-r--r--source3/lib/smbconf/smbconf_reg.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/lib/smbconf/smbconf_reg.c b/source3/lib/smbconf/smbconf_reg.c
index fbc8577835..d43c6a15f1 100644
--- a/source3/lib/smbconf/smbconf_reg.c
+++ b/source3/lib/smbconf/smbconf_reg.c
@@ -984,8 +984,15 @@ static WERROR smbconf_reg_set_includes(struct smbconf_ctx *ctx,
goto done;
}
- werr = smbconf_reg_set_multi_sz_value(key, INCLUDES_VALNAME,
- num_includes, includes);
+ if (num_includes == 0) {
+ if (!smbconf_value_exists(key, INCLUDES_VALNAME)) {
+ goto done;
+ }
+ werr = reg_deletevalue(key, INCLUDES_VALNAME);
+ } else {
+ werr = smbconf_reg_set_multi_sz_value(key, INCLUDES_VALNAME,
+ num_includes, includes);
+ }
done:
TALLOC_FREE(tmp_ctx);