summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libgpo/gpo_reg.c5
-rw-r--r--source3/registry/reg_init_basic.c10
-rw-r--r--source3/utils/net_registry.c2
3 files changed, 9 insertions, 8 deletions
diff --git a/source3/libgpo/gpo_reg.c b/source3/libgpo/gpo_reg.c
index 80639b86c5..de4a7937ec 100644
--- a/source3/libgpo/gpo_reg.c
+++ b/source3/libgpo/gpo_reg.c
@@ -60,8 +60,9 @@ WERROR gp_init_reg_ctx(TALLOC_CTX *mem_ctx,
return WERR_INVALID_PARAM;
}
- if (!registry_init_basic()) {
- return WERR_CAN_NOT_COMPLETE;
+ werr = registry_init_basic();
+ if (!W_ERROR_IS_OK(werr)) {
+ return werr;
}
tmp_ctx = TALLOC_ZERO_P(mem_ctx, struct gp_registry_context);
diff --git a/source3/registry/reg_init_basic.c b/source3/registry/reg_init_basic.c
index 72ab9d1e65..cdf172c289 100644
--- a/source3/registry/reg_init_basic.c
+++ b/source3/registry/reg_init_basic.c
@@ -22,7 +22,7 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
-bool registry_init_basic(void)
+WERROR registry_init_basic(void)
{
WERROR werr;
@@ -32,16 +32,16 @@ bool registry_init_basic(void)
if (!W_ERROR_IS_OK(werr)) {
DEBUG(1, ("Failed to initialize the registry: %s\n",
dos_errstr(werr)));
- return false;
+ goto done;
}
- regdb_close();
werr = reghook_cache_init();
if (!W_ERROR_IS_OK(werr)) {
DEBUG(1, ("Failed to initialize the reghook cache: %s\n",
dos_errstr(werr)));
- return false;
}
- return true;
+done:
+ regdb_close();
+ return werr;
}
diff --git a/source3/utils/net_registry.c b/source3/utils/net_registry.c
index 6af8236092..f6847f638d 100644
--- a/source3/utils/net_registry.c
+++ b/source3/utils/net_registry.c
@@ -473,7 +473,7 @@ int net_registry(int argc, const char **argv)
{ NULL, NULL, NULL }
};
- if (!registry_init_basic()) {
+ if (!W_ERROR_IS_OK(registry_init_basic())) {
return -1;
}