From: Michael Adam Date: Thu, 8 May 2008 16:08:41 +0000 (+0200) Subject: registry: add removal of secdesc of a key to regdb_store_keys(). X-Git-Tag: samba-4.0.0alpha6~801^2~1463 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f7d39653f5c5bea025a77191555231e8a28b25b8;p=thirdparty%2Fsamba.git registry: add removal of secdesc of a key to regdb_store_keys(). Michael (This used to be commit a01d8fe5e89ca9620d23198b11e5ae605a97e5a6) --- diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index 8de10a0b1f4..0d976be10d4 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);