diff options
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/registry/common/reg_interface.c | 5 | ||||
-rw-r--r-- | source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c | 5 | ||||
-rw-r--r-- | source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/source4/lib/registry/common/reg_interface.c b/source4/lib/registry/common/reg_interface.c index 16edadfcbb..6237a788b7 100644 --- a/source4/lib/registry/common/reg_interface.c +++ b/source4/lib/registry/common/reg_interface.c @@ -191,7 +191,10 @@ WERROR reg_import_hive(struct registry_context *h, const char *backend, const ch if(!W_ERROR_IS_OK(werr)) return werr; - if(!ret->root) return WERR_GENERAL_FAILURE; + if(!ret->root) { + DEBUG(0, ("Backend %s didn't provide root key!\n", backend)); + return WERR_GENERAL_FAILURE; + } ret->root->hive = ret; ret->root->name = NULL; 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 faa8a5e62c..b26ee6ec60 100644 --- a/source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c +++ b/source4/lib/registry/reg_backend_ldb/reg_backend_ldb.c @@ -146,7 +146,10 @@ static WERROR ldb_open_hive(TALLOC_CTX *mem_ctx, struct registry_hive *hive, str ldb_set_debug_stderr(c); hive->backend_data = c; - return ldb_open_key(mem_ctx, hive, "", k); + hive->root = talloc_zero_p(mem_ctx, struct registry_key); + hive->root->name = talloc_strdup(mem_ctx, ""); + + return WERR_OK; } static struct registry_operations reg_backend_ldb = { diff --git a/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c b/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c index 76c19d01ad..5ed03c062c 100644 --- a/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c +++ b/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c @@ -85,7 +85,7 @@ struct { static WERROR rpc_query_key(struct registry_key *k); -WERROR rpc_list_hives (TALLOC_CTX *mem_ctx, const char *location, const char *credentials, char ***hives) +static WERROR rpc_list_hives (TALLOC_CTX *mem_ctx, const char *location, const char *credentials, char ***hives) { int i = 0; *hives = talloc_p(mem_ctx, char *); |