summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-04-29 17:18:26 +0200
committerMichael Adam <obnox@samba.org>2008-04-30 12:42:32 +0200
commited6a9edb1ef129f82aa7841dd18151da28b7ce6d (patch)
tree12e86a745d3df7455c401947c5a082df258237b0 /source3/registry
parent6ec4c8631a16d6798bf48083a84df7ad90f79617 (diff)
downloadsamba-ed6a9edb1ef129f82aa7841dd18151da28b7ce6d.tar.gz
samba-ed6a9edb1ef129f82aa7841dd18151da28b7ce6d.tar.bz2
samba-ed6a9edb1ef129f82aa7841dd18151da28b7ce6d.zip
registry: check for existence of key init_registry_key and possibly save a write.
Michael (This used to be commit 3ab5a2f1b3cf37c380ff3e45a957e62a8017814a)
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_backend_db.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 33454c9064..e10cfb520b 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -201,6 +201,10 @@ WERROR init_registry_key(const char *add_path)
{
WERROR werr;
+ if (regdb_key_exists(add_path)) {
+ return WERR_OK;
+ }
+
if (regdb->transaction_start(regdb) != 0) {
DEBUG(0, ("init_registry_key: transaction_start failed\n"));
return WERR_REG_IO_FAILURE;