mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4-smbd: initialise process models in smbtorture before use
the spoolss notify test needs to setup the process models before use Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Sat Oct 30 13:32:09 UTC 2010 on sn-devel-104
This commit is contained in:
parent
35d466e66b
commit
b4ba669e48
@ -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;
|
||||
}
|
||||
|
@ -460,6 +460,10 @@ static bool test_start_dcerpc_server(struct torture_context *tctx,
|
||||
|
||||
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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user