diff options
author | Gregor Beck <gbeck@sernet.de> | 2012-01-24 10:45:32 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2012-01-24 13:54:09 +0100 |
commit | f1545048eb4d1917234540308977908244e6e8fb (patch) | |
tree | 7de81f62138156a1f4028bf6697259058d361df5 /source3/registry | |
parent | bbacd901cda42a0a5c284164c46f750a76fd0c7e (diff) | |
download | samba-f1545048eb4d1917234540308977908244e6e8fb.tar.gz samba-f1545048eb4d1917234540308977908244e6e8fb.tar.bz2 samba-f1545048eb4d1917234540308977908244e6e8fb.zip |
s3:registry: do not write empty value lists to registry.tdb
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Jan 24 13:54:09 CET 2012 on sn-devel-104
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_backend_db.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index 0245f4ca10..8537f40600 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -1909,6 +1909,11 @@ static NTSTATUS regdb_store_values_internal(struct db_context *db, goto done; } + if (regval_ctr_numvals(values) == 0) { + WERROR werr = regdb_delete_values(db, key); + return werror_to_ntstatus(werr); + } + ZERO_STRUCT(data); len = regdb_pack_values(values, data.dptr, data.dsize); |