summaryrefslogtreecommitdiff
path: root/source4/smbd/server.c
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
commit448483199fb436309735f5203b3282fca2c517ec (patch)
treefcd663e46d0eac19b98037008a435bdd57ca7f8e /source4/smbd/server.c
parentee10fb1a12391a76fe81e6e7a92d282ef885bc30 (diff)
downloadsamba-448483199fb436309735f5203b3282fca2c517ec.tar.gz
samba-448483199fb436309735f5203b3282fca2c517ec.tar.bz2
samba-448483199fb436309735f5203b3282fca2c517ec.zip
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)
Diffstat (limited to 'source4/smbd/server.c')
-rw-r--r--source4/smbd/server.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/smbd/server.c b/source4/smbd/server.c
index 97b9bf8023..838cb627d7 100644
--- a/source4/smbd/server.c
+++ b/source4/smbd/server.c
@@ -154,6 +154,8 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
BOOL interactive = False;
int opt;
poptContext pc;
+ init_module_fn static_init[] = STATIC_SERVER_SERVICE_MODULES;
+ init_module_fn *shared_init;
struct event_context *event_ctx;
NTSTATUS status;
const char *model = "standard";
@@ -214,6 +216,13 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
smbd_init_subsystems;
+ shared_init = load_samba_modules(NULL, "service");
+
+ run_init_functions(static_init);
+ run_init_functions(shared_init);
+
+ talloc_free(shared_init);
+
/* the event context is the top level structure in smbd. Everything else
should hang off that */
event_ctx = event_context_init(NULL);