summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/process_model.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/source4/smbd/process_model.c b/source4/smbd/process_model.c
index 0e63605460..3d5e2ce229 100644
--- a/source4/smbd/process_model.c
+++ b/source4/smbd/process_model.c
@@ -108,13 +108,19 @@ _PUBLIC_ NTSTATUS process_model_init(struct loadparm_context *lp_ctx)
extern NTSTATUS process_model_prefork_init(void);
extern NTSTATUS process_model_onefork_init(void);
extern NTSTATUS process_model_single_init(void);
- init_module_fn static_init[] = { STATIC_process_model_MODULES };
- init_module_fn *shared_init = load_samba_modules(NULL, lp_ctx, "process_model");
+ static bool initialised;
- run_init_functions(static_init);
- run_init_functions(shared_init);
+ if (!initialised) {
+ init_module_fn static_init[] = { STATIC_process_model_MODULES };
+ init_module_fn *shared_init;
+ initialised = true;
+ shared_init = load_samba_modules(NULL, lp_ctx, "process_model");
- talloc_free(shared_init);
+ run_init_functions(static_init);
+ run_init_functions(shared_init);
+
+ talloc_free(shared_init);
+ }
return NT_STATUS_OK;
}