summaryrefslogtreecommitdiff
path: root/source/ntptr
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-12-26 16:46:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:45 -0500
commitb6d2ad4ce0a91c4be790dd258820c492ff1787ea (patch)
treeda3953a18956409c28d44397f0c486a17c7a1b54 /source/ntptr
parentba6a767f1b3a14e076ebd049b4fdcffd64173523 (diff)
downloadsamba-b6d2ad4ce0a91c4be790dd258820c492ff1787ea.tar.gz
r12494: Support loading modules from .so files for most subsystems.
We now use a different system for initializing the modules for a subsystem. Most subsystems now have an init function that looks something like this: init_module_fn static_init[] = STATIC_AUTH_MODULES; init_module_fn *shared_init = load_samba_modules(NULL, "auth"); run_init_functions(static_init); run_init_functions(shared_init); talloc_free(shared_init); I hope to eliminate the other init functions later on (the init_programname_subsystems; defines).
Diffstat (limited to 'source/ntptr')
-rw-r--r--source/ntptr/config.mk1
-rw-r--r--source/ntptr/ntptr_base.c13
2 files changed, 14 insertions, 0 deletions
diff --git a/source/ntptr/config.mk b/source/ntptr/config.mk
index cbce1d66bd6..37150211fc6 100644
--- a/source/ntptr/config.mk
+++ b/source/ntptr/config.mk
@@ -15,6 +15,7 @@ REQUIRED_SUBSYSTEMS = \
################################################
# Start SUBSYSTEM NTPTR
[SUBSYSTEM::NTPTR]
+INIT_FUNCTION = ntptr_init
INIT_OBJ_FILES = \
ntptr_base.o
ADD_OBJ_FILES = \
diff --git a/source/ntptr/ntptr_base.c b/source/ntptr/ntptr_base.c
index f12a58cb4ec..9f07ae597bb 100644
--- a/source/ntptr/ntptr_base.c
+++ b/source/ntptr/ntptr_base.c
@@ -69,6 +69,19 @@ NTSTATUS ntptr_register(const void *_ops)
return NT_STATUS_OK;
}
+NTSTATUS ntptr_init(void)
+{
+ init_module_fn static_init[] = STATIC_NTPTR_MODULES;
+ init_module_fn *shared_init = load_samba_modules(NULL, "ntptr");
+
+ run_init_functions(static_init);
+ run_init_functions(shared_init);
+
+ talloc_free(shared_init);
+
+ return NT_STATUS_OK;
+}
+
/*
return the operations structure for a named backend