summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-07-01 13:18:51 +0200
committerMichael Adam <obnox@samba.org>2011-07-04 20:02:08 +0200
commita25563035823e720a068c3021e01b0556feb7f18 (patch)
treeddee21897f7dd2b265650a5ee35fcfc5e80b2d0a /source3/registry
parent9e2b2c1fcc6d0bd852df715fdae7854b3ae77027 (diff)
downloadsamba-a25563035823e720a068c3021e01b0556feb7f18.tar.gz
samba-a25563035823e720a068c3021e01b0556feb7f18.tar.bz2
samba-a25563035823e720a068c3021e01b0556feb7f18.zip
s3:registry: regdb_key_exists now checks only for the list-of-subkeys-record
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_backend_db.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index d1ca9f2603..dd80940a0a 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -1602,7 +1602,7 @@ static bool regdb_key_exists(struct db_context *db, const char *key)
TALLOC_CTX *mem_ctx = talloc_stackframe();
TDB_DATA value;
bool ret = false;
- char *path, *p;
+ char *path;
if (key == NULL) {
goto done;
@@ -1618,15 +1618,8 @@ static bool regdb_key_exists(struct db_context *db, const char *key)
goto done;
}
- p = strrchr(path, '\\');
- if (p == NULL) {
- /* this is a base key */
- value = regdb_fetch_key_internal(db, mem_ctx, path);
- ret = (value.dptr != NULL);
- } else {
- *p = '\0';
- ret = scan_parent_subkeys(db, path, p+1);
- }
+ value = regdb_fetch_key_internal(db, mem_ctx, path);
+ ret = (value.dptr != NULL);
done:
TALLOC_FREE(mem_ctx);