From f7d39653f5c5bea025a77191555231e8a28b25b8 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 8 May 2008 18:08:41 +0200 Subject: registry: add removal of secdesc of a key to regdb_store_keys(). Michael (This used to be commit a01d8fe5e89ca9620d23198b11e5ae605a97e5a6) --- source3/registry/reg_backend_db.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source3/registry') diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index 8de10a0b1f..0d976be10d 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -688,6 +688,23 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr) dbwrap_delete_bystring(regdb, path); TALLOC_FREE(path); + /* (b) Delete the secdesc for this key */ + + path = talloc_asprintf(ctx, "%s/%s/%s", + REG_SECDESC_PREFIX, + key, + oldkeyname ); + if (!path) { + goto cancel; + } + path = normalize_reg_path(ctx, path); + if (!path) { + goto cancel; + } + /* Ignore errors here, we might have no values around */ + dbwrap_delete_bystring(regdb, path); + TALLOC_FREE(path); + /* (c) Delete the list of subkeys of this key */ path = talloc_asprintf(ctx, "%s/%s", key, oldkeyname); -- cgit