summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/registry/reg_backend_db.c11
-rw-r--r--source3/registry/reg_init_full.c7
-rw-r--r--source3/registry/reg_init_smbconf.c5
3 files changed, 14 insertions, 9 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index e2e908cb84..04b01797f7 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -183,7 +183,7 @@ fail:
* create each component key of the specified path,
* wrapped in one db transaction.
*/
-static bool init_registry_key(const char *add_path)
+bool init_registry_key(const char *add_path)
{
if (regdb->transaction_start(regdb) == -1) {
DEBUG(0, ("init_registry_key: transaction_start failed\n"));
@@ -213,7 +213,7 @@ fail:
Open the registry data in the tdb
***********************************************************************/
-static bool init_registry_data(void)
+bool init_registry_data(void)
{
TALLOC_CTX *frame = NULL;
REGVAL_CTR *values;
@@ -351,13 +351,6 @@ bool regdb_init( void )
vers_id, REGVER_V1));
}
- /* always setup the necessary keys and values */
-
- if ( !init_registry_data() ) {
- DEBUG(0,("regdb_init: Failed to initialize data in registry!\n"));
- return false;
- }
-
return true;
}
diff --git a/source3/registry/reg_init_full.c b/source3/registry/reg_init_full.c
index b6a644bb11..5c59c6ba96 100644
--- a/source3/registry/reg_init_full.c
+++ b/source3/registry/reg_init_full.c
@@ -74,6 +74,13 @@ bool init_registry( void )
goto fail;
}
+ /* setup the necessary keys and values */
+
+ if ( !init_registry_data() ) {
+ DEBUG(0,("regdb_init: Failed to initialize data in registry!\n"));
+ return false;
+ }
+
/* build the cache tree of registry hooks */
reghook_cache_init();
diff --git a/source3/registry/reg_init_smbconf.c b/source3/registry/reg_init_smbconf.c
index b7e6add112..1b17852a7a 100644
--- a/source3/registry/reg_init_smbconf.c
+++ b/source3/registry/reg_init_smbconf.c
@@ -84,6 +84,11 @@ bool registry_init_smbconf(void)
DEBUGADD(1, (".\n"));
goto done;
}
+ if (!init_registry_key(KEY_SMBCONF)) {
+ DEBUG(1, ("Could not initialize registry key '%s'\n",
+ KEY_SMBCONF));
+ goto done;
+ }
reghook_cache_init();
if (!reghook_cache_add(&smbconf_reg_hook)) {
DEBUG(1, ("Error adding smbconf reghooks to reghook cache.\n"));