summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/registry/common/reg_interface.c1
-rw-r--r--source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c9
-rw-r--r--source4/lib/registry/tools/regtree.c11
3 files changed, 9 insertions, 12 deletions
diff --git a/source4/lib/registry/common/reg_interface.c b/source4/lib/registry/common/reg_interface.c
index 28025e4d84..16edadfcbb 100644
--- a/source4/lib/registry/common/reg_interface.c
+++ b/source4/lib/registry/common/reg_interface.c
@@ -185,6 +185,7 @@ WERROR reg_import_hive(struct registry_context *h, const char *backend, const ch
ret->functions = entry->functions;
ret->backend_data = NULL;
ret->reg_ctx = h;
+ ret->name = NULL;
werr = entry->functions->open_hive(mem_ctx, ret, &ret->root);
diff --git a/source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c b/source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c
index cc0432d9ea..7e228412d5 100644
--- a/source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c
+++ b/source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c
@@ -51,8 +51,6 @@ static char *reg_path_to_ldb(TALLOC_CTX *mem_ctx, const char *path, const char *
ret[strlen(ret)-1] = '\0';
- printf("RETURNING: %s\n", ret);
-
if(strlen(ret) == 0) return NULL;
return ret;
@@ -65,9 +63,6 @@ static int ldb_close_registry(void *data)
return 0;
}
-
-
-
static WERROR ldb_add_key(TALLOC_CTX *mem_ctx, struct registry_key *p, const char *name, uint32_t access_mask, SEC_DESC *sec, struct registry_key **new)
{
return WERR_NOT_SUPPORTED;
@@ -94,7 +89,6 @@ static WERROR ldb_get_subkey_by_id(TALLOC_CTX *mem_ctx, struct registry_key *k,
*subkey = talloc_p(mem_ctx, struct registry_key);
(*subkey)->name = talloc_strdup(mem_ctx, el->values[0].data);
(*subkey)->backend_data = talloc_strdup(mem_ctx, msg[idx]->dn);
- printf("Retrieved: %s\n", (*subkey)->backend_data);
ldb_search_free(c, msg);
return WERR_OK;
@@ -158,7 +152,6 @@ static WERROR ldb_open_key(TALLOC_CTX *mem_ctx, struct registry_hive *h, const c
*key = talloc_p(mem_ctx, struct registry_key);
(*key)->name = talloc_strdup(mem_ctx, strrchr(name, '\\'));
(*key)->backend_data = talloc_strdup(mem_ctx, msg[0]->dn);
- printf("Retrieved: %s\n", (*key)->backend_data);
ldb_search_free(c, msg);
@@ -183,7 +176,7 @@ static struct registry_operations reg_backend_ldb = {
.name = "ldb",
.open_hive = ldb_open_hive,
.open_key = ldb_open_key,
-/* .fetch_subkeys = ldb_fetch_subkeys,
+/*
.fetch_values = ldb_fetch_values,*/
.get_subkey_by_index = ldb_get_subkey_by_id,
.add_key = ldb_add_key,
diff --git a/source4/lib/registry/tools/regtree.c b/source4/lib/registry/tools/regtree.c
index 9748ca3438..bc0055a891 100644
--- a/source4/lib/registry/tools/regtree.c
+++ b/source4/lib/registry/tools/regtree.c
@@ -32,10 +32,13 @@ static void print_tree(int l, struct registry_key *p, int fullpath, int novals)
for(i = 0; i < l; i++) putchar(' ');
/* Hive name */
- if(p->hive->root == p) printf("%s\n", p->hive->name);
- else if(!p->name) printf("<No Name>\n");
- else if(fullpath) printf("%s\n", p->path);
- else printf("%s\n", p->name);
+ if(p->hive->root == p) {
+ if(p->hive->name) printf("%s\n", p->hive->name); else printf("<No Name>\n");
+ } else {
+ if(!p->name) printf("<No Name>\n");
+ if(fullpath) printf("%s\n", p->path);
+ else printf("%s\n", p->name);
+ }
mem_ctx = talloc_init("print_tree");
for(i = 0; W_ERROR_IS_OK(error = reg_key_get_subkey_by_index(mem_ctx, p, i, &subkey)); i++) {