summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-05-08 14:33:02 +0200
committerMichael Adam <obnox@samba.org>2008-05-08 18:29:10 +0200
commit315c7b782441b2db5a7548a488deff563b6c3668 (patch)
tree25a36480fb356f8fa339895be860240d324ac9d6 /source3
parent01e640f6ea609ec2235543d69b1715a1be7d09b3 (diff)
downloadsamba-315c7b782441b2db5a7548a488deff563b6c3668.tar.gz
samba-315c7b782441b2db5a7548a488deff563b6c3668.tar.bz2
samba-315c7b782441b2db5a7548a488deff563b6c3668.zip
registry: regdb_store_keys: move storing the subkey list down after removing values.
Michael (This used to be commit 986030cdda828f7f87c5464d1837324b7033e27e)
Diffstat (limited to 'source3')
-rw-r--r--source3/registry/reg_backend_db.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 87837448d9..182a7ba694 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -657,14 +657,6 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr)
* out of the blue when re-adding keys later on.
*/
- /* store the subkey list for the parent */
-
- if (!regdb_store_keys_internal(key, ctr) ) {
- DEBUG(0,("regdb_store_keys: Failed to store new subkey list "
- "for parent [%s]\n", key));
- goto cancel;
- }
-
/* now delete removed keys */
num_subkeys = regsubkey_ctr_numkeys(old_subkeys);
@@ -715,6 +707,14 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr)
TALLOC_FREE(old_subkeys);
+ /* (2) store the subkey list for the parent */
+
+ if (!regdb_store_keys_internal(key, ctr) ) {
+ DEBUG(0,("regdb_store_keys: Failed to store new subkey list "
+ "for parent [%s]\n", key));
+ goto cancel;
+ }
+
/* now create records for any subkeys that don't already exist */
num_subkeys = regsubkey_ctr_numkeys(ctr);