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;
}
torture_comment(tctx, "Listening for callbacks on %s\n", address);
+ status = process_model_init(tctx->lp_ctx);
+ torture_assert_ntstatus_ok(tctx, status,
+ "unable to initialize process models");
+
status = smbsrv_add_socket(event_ctx, tctx->lp_ctx, process_model_startup("single"), address);
torture_assert_ntstatus_ok(tctx, status, "starting smb server");