From 448483199fb436309735f5203b3282fca2c517ec Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 26 Dec 2005 16:46:55 +0000 Subject: 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). (This used to be commit b6d2ad4ce0a91c4be790dd258820c492ff1787ea) --- source4/lib/com/config.mk | 1 + source4/lib/com/main.c | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'source4/lib/com') diff --git a/source4/lib/com/config.mk b/source4/lib/com/config.mk index dc4fe644c6..77e3724924 100644 --- a/source4/lib/com/config.mk +++ b/source4/lib/com/config.mk @@ -1,4 +1,5 @@ [SUBSYSTEM::COM] +INIT_FUNCTION = com_init INIT_OBJ_FILES = \ tables.o \ rot.o \ diff --git a/source4/lib/com/main.c b/source4/lib/com/main.c index 210e8ba79c..f264c3f25b 100644 --- a/source4/lib/com/main.c +++ b/source4/lib/com/main.c @@ -24,7 +24,7 @@ #include "lib/events/events.h" #include "librpc/gen_ndr/com_dcom.h" -WERROR com_init(struct com_context **ctx, struct event_context *event_ctx) +WERROR com_init_ctx(struct com_context **ctx, struct event_context *event_ctx) { *ctx = talloc(NULL, struct com_context); if (event_ctx == NULL) { @@ -88,3 +88,16 @@ WERROR com_get_class_object(struct com_context *ctx, struct GUID *clsid, struct return IUnknown_QueryInterface(iu, ctx, iid, ip); } + +NTSTATUS com_init(void) +{ + init_module_fn static_init[] = STATIC_COM_MODULES; + init_module_fn *shared_init = load_samba_modules(NULL, "com"); + + run_init_functions(static_init); + run_init_functions(shared_init); + + talloc_free(shared_init); + + return NT_STATUS_OK; +} -- cgit