diff options
author | Michael Adam <obnox@samba.org> | 2008-05-08 18:08:41 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-05-08 18:29:10 +0200 |
commit | f7d39653f5c5bea025a77191555231e8a28b25b8 (patch) | |
tree | 3c33fc45da94128e6f939a4372692b47ff6c81c6 /source3/registry | |
parent | 1f279f866fd93ccd1524f3e4fe48da0cf3dc4ff8 (diff) | |
download | samba-f7d39653f5c5bea025a77191555231e8a28b25b8.tar.gz samba-f7d39653f5c5bea025a77191555231e8a28b25b8.tar.bz2 samba-f7d39653f5c5bea025a77191555231e8a28b25b8.zip |
registry: add removal of secdesc of a key to regdb_store_keys().
Michael
(This used to be commit a01d8fe5e89ca9620d23198b11e5ae605a97e5a6)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_backend_db.c | 17 |
1 files changed, 17 insertions, 0 deletions
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); |