diff options
author | Michael Adam <obnox@samba.org> | 2011-06-30 14:37:49 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-06-30 15:41:23 +0200 |
commit | 1f72088633c2215a23e086c8627f35621b47ffec (patch) | |
tree | 4fb179e30848c9240b3ae5505cbe4f09d9e5fa17 /source3/registry | |
parent | 2b162db6e9cc3e098f339516bbda719618664a83 (diff) | |
download | samba-1f72088633c2215a23e086c8627f35621b47ffec.tar.gz samba-1f72088633c2215a23e086c8627f35621b47ffec.tar.bz2 samba-1f72088633c2215a23e086c8627f35621b47ffec.zip |
s3:registry: when deleting the records for a key, also delete the sorted subkeys cache
This prevents orphaned empty sorted subkeys cache records from filling the database.
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_backend_db.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index c82ab1dc25..2fda23895f 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -737,6 +737,14 @@ static WERROR regdb_delete_key_lists(struct db_context *db, const char *keyname) goto done; } + werr = regdb_delete_sorted_subkeys(db, keyname); + if (!W_ERROR_IS_OK(werr)) { + DEBUG(1, (__location__ " Deleting %s\\%s failed: %s\n", + REG_SORTED_SUBKEYS_PREFIX, keyname, + win_errstr(werr))); + goto done; + } + werr = regdb_delete_subkeylist(db, keyname); if (!W_ERROR_IS_OK(werr)) { DEBUG(1, (__location__ " Deleting %s failed: %s\n", |