#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
-WERROR registry_init_common(void)
+WERROR registry_init_basic(void)
{
WERROR werr;
+ DEBUG(10, ("registry_init_basic called\n"));
+
werr = regdb_init();
if (!W_ERROR_IS_OK(werr)) {
- DEBUG(0, ("Failed to initialize the registry: %s\n",
+ DEBUG(1, ("Failed to initialize the registry: %s\n",
dos_errstr(werr)));
goto done;
}
werr = reghook_cache_init();
if (!W_ERROR_IS_OK(werr)) {
- DEBUG(0, ("Failed to initialize the reghook cache: %s\n",
+ DEBUG(1, ("Failed to initialize the reghook cache: %s\n",
dos_errstr(werr)));
}
done:
- return werr;
-}
-
-WERROR registry_init_basic(void)
-{
- WERROR werr;
-
- DEBUG(10, ("registry_init_basic called\n"));
-
- werr = registry_init_common();
regdb_close();
return werr;
}
int i;
WERROR werr;
- werr = registry_init_common();
+ werr = regdb_init();
if (!W_ERROR_IS_OK(werr)) {
+ DEBUG(0, ("Failed to initialize the registry: %s\n",
+ dos_errstr(werr)));
goto fail;
}
/* build the cache tree of registry hooks */
+ werr = reghook_cache_init();
+ if (!W_ERROR_IS_OK(werr)) {
+ DEBUG(0, ("Failed to initialize the reghook cache: %s\n",
+ dos_errstr(werr)));
+ goto fail;
+ }
+
for ( i=0; reg_hooks[i].keyname; i++ ) {
werr = reghook_cache_add(reg_hooks[i].keyname, reg_hooks[i].ops);
if (!W_ERROR_IS_OK(werr)) {
keyname = KEY_SMBCONF;
}
- werr = registry_init_common();
+ werr = regdb_init();
if (!W_ERROR_IS_OK(werr)) {
+ DEBUG(1, ("Failed to initialize the registry: %s\n",
+ dos_errstr(werr)));
goto done;
}
goto done;
}
+ werr = reghook_cache_init();
+ if (!W_ERROR_IS_OK(werr)) {
+ DEBUG(1, ("Failed to initialize the reghook cache: %s\n",
+ dos_errstr(werr)));
+ goto done;
+ }
+
werr = reghook_cache_add(keyname, &smbconf_reg_ops);
if (!W_ERROR_IS_OK(werr)) {
DEBUG(1, ("Failed to add smbconf reghooks to reghook cache: "