summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_cachehook.c6
-rw-r--r--source3/registry/reg_init_full.c4
-rw-r--r--source3/registry/reg_init_smbconf.c6
3 files changed, 10 insertions, 6 deletions
diff --git a/source3/registry/reg_cachehook.c b/source3/registry/reg_cachehook.c
index 66b9ae6c4e..6697a69356 100644
--- a/source3/registry/reg_cachehook.c
+++ b/source3/registry/reg_cachehook.c
@@ -79,13 +79,13 @@ WERROR reghook_cache_init(void)
is not in the exact format that a SORTED_TREE expects.
*********************************************************************/
-bool reghook_cache_add(const char *keyname, REGISTRY_OPS *ops)
+WERROR reghook_cache_add(const char *keyname, REGISTRY_OPS *ops)
{
WERROR werr;
char *key = NULL;
if ((keyname == NULL) || (ops == NULL)) {
- return false;
+ return WERR_INVALID_PARAM;
}
werr = keyname_to_path(talloc_tos(), keyname, &key);
@@ -100,7 +100,7 @@ bool reghook_cache_add(const char *keyname, REGISTRY_OPS *ops)
done:
TALLOC_FREE(key);
- return W_ERROR_IS_OK(werr);
+ return werr;
}
/**********************************************************************
diff --git a/source3/registry/reg_init_full.c b/source3/registry/reg_init_full.c
index 8c834c4abb..e24cb61481 100644
--- a/source3/registry/reg_init_full.c
+++ b/source3/registry/reg_init_full.c
@@ -93,8 +93,10 @@ bool init_registry( void )
}
for ( i=0; reg_hooks[i].keyname; i++ ) {
- if (!reghook_cache_add(reg_hooks[i].keyname, reg_hooks[i].ops))
+ werr = reghook_cache_add(reg_hooks[i].keyname, reg_hooks[i].ops);
+ if (!W_ERROR_IS_OK(werr)) {
goto fail;
+ }
}
if ( DEBUGLEVEL >= 20 )
diff --git a/source3/registry/reg_init_smbconf.c b/source3/registry/reg_init_smbconf.c
index bfc85afb22..fafaf7952f 100644
--- a/source3/registry/reg_init_smbconf.c
+++ b/source3/registry/reg_init_smbconf.c
@@ -101,8 +101,10 @@ bool registry_init_smbconf(const char *keyname)
goto done;
}
- if (!reghook_cache_add(keyname, &smbconf_reg_ops)) {
- DEBUG(1, ("Failed to add smbconf reghooks to reghook cache\n"));
+ werr = reghook_cache_add(keyname, &smbconf_reg_ops);
+ if (!W_ERROR_IS_OK(werr)) {
+ DEBUG(1, ("Failed to add smbconf reghooks to reghook cache: "
+ "%s\n", dos_errstr(werr)));
goto done;
}