summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/process_model.c13
-rw-r--r--source4/smbd/process_model.mk1
-rw-r--r--source4/smbd/server.c9
3 files changed, 23 insertions, 0 deletions
diff --git a/source4/smbd/process_model.c b/source4/smbd/process_model.c
index d3e5eeaa48..312cc5e264 100644
--- a/source4/smbd/process_model.c
+++ b/source4/smbd/process_model.c
@@ -80,6 +80,19 @@ NTSTATUS register_process_model(const void *_ops)
return NT_STATUS_OK;
}
+NTSTATUS process_model_init(void)
+{
+ init_module_fn static_init[] = STATIC_PROCESS_MODEL_MODULES;
+ init_module_fn *shared_init = load_samba_modules(NULL, "process_model");
+
+ 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 of the specified type
*/
diff --git a/source4/smbd/process_model.mk b/source4/smbd/process_model.mk
index 2e71a8fb7a..11df266dc6 100644
--- a/source4/smbd/process_model.mk
+++ b/source4/smbd/process_model.mk
@@ -34,6 +34,7 @@ REQUIRED_SUBSYSTEMS = EXT_LIB_PTHREAD
################################################
# Start SUBSYSTEM PROCESS_MODEL
[SUBSYSTEM::PROCESS_MODEL]
+INIT_FUNCTION = process_model_init
INIT_OBJ_FILES = \
process_model.o
#
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);