summaryrefslogtreecommitdiff
path: root/source4/lib/registry
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/registry')
-rw-r--r--source4/lib/registry/common/reg_interface.c13
-rw-r--r--source4/lib/registry/config.mk1
2 files changed, 14 insertions, 0 deletions
diff --git a/source4/lib/registry/common/reg_interface.c b/source4/lib/registry/common/reg_interface.c
index 87bc3fd70c..ac8b90dcdb 100644
--- a/source4/lib/registry/common/reg_interface.c
+++ b/source4/lib/registry/common/reg_interface.c
@@ -64,6 +64,19 @@ static struct reg_init_function_entry *reg_find_backend_entry(const char *name)
return NULL;
}
+NTSTATUS registry_init(void)
+{
+ init_module_fn static_init[] = STATIC_REGISTRY_MODULES;
+ init_module_fn *shared_init = load_samba_modules(NULL, "registry");
+
+ run_init_functions(static_init);
+ run_init_functions(shared_init);
+
+ talloc_free(shared_init);
+
+ return NT_STATUS_OK;
+}
+
/* Check whether a certain backend is present */
BOOL reg_has_backend(const char *backend)
{
diff --git a/source4/lib/registry/config.mk b/source4/lib/registry/config.mk
index 775e201f7e..768697e2a1 100644
--- a/source4/lib/registry/config.mk
+++ b/source4/lib/registry/config.mk
@@ -81,6 +81,7 @@ REQUIRED_SUBSYSTEMS = \
[LIBRARY::REGISTRY]
MAJOR_VERSION = 0
MINOR_VERSION = 0
+INIT_FUNCTION = registry_init
DESCRIPTION = Windows-style registry library
RELEASE_VERSION = 1
INIT_OBJ_FILES = \