diff options
author | Michael Adam <obnox@samba.org> | 2008-04-09 18:46:02 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-04-10 01:29:01 +0200 |
commit | 1321dda51bf3fd208d77cebafc14fec2800cc10d (patch) | |
tree | 5af5992ff16cfc3d48df681f71bfa9538303bba7 /source3/lib/smbconf | |
parent | 9a3fe1943e7dfa68f83ee7d2e472e5732f6a665d (diff) | |
download | samba-1321dda51bf3fd208d77cebafc14fec2800cc10d.tar.gz samba-1321dda51bf3fd208d77cebafc14fec2800cc10d.tar.bz2 samba-1321dda51bf3fd208d77cebafc14fec2800cc10d.zip |
libsmbconf: let set_includes delete the includes paramter when given an empty list
instead of complaining
Michael
(This used to be commit 0dc1fd68598529891429fb29ab1f561fb434bf38)
Diffstat (limited to 'source3/lib/smbconf')
-rw-r--r-- | source3/lib/smbconf/smbconf_reg.c | 11 |
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); |