From 65e688f5ddb91ffe3f04c0ed07860d53fe5bf48d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 12 Dec 2004 00:35:50 +0000 Subject: r4158: Fix IDL for InitiateShutdown and AbortShutdown and run both only when dangerous tests are enabled. (This used to be commit a763bd838558bdd7bcab3ca7ee91c1846d7a950f) --- source4/torture/rpc/winreg.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'source4/torture') diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c index 3ed7af0e29..2f9797e693 100644 --- a/source4/torture/rpc/winreg.c +++ b/source4/torture/rpc/winreg.c @@ -526,10 +526,12 @@ static BOOL test_InitiateSystemShutdown(struct dcerpc_pipe *p, TALLOC_CTX *mem_c struct winreg_InitiateSystemShutdown r; NTSTATUS status; - init_winreg_String(&r.in.hostname, NULL); - init_winreg_String(&r.in.message, msg); - r.in.flags = 0; + r.in.hostname = NULL; + r.in.message = talloc_p(mem_ctx, struct winreg_String); + init_winreg_String(r.in.message, msg); + r.in.force_apps = 1; r.in.timeout = timeout; + r.in.reboot = 1; status = dcerpc_winreg_InitiateSystemShutdown(p, mem_ctx, &r); @@ -706,11 +708,12 @@ BOOL torture_rpc_winreg(void) return False; } - if(!test_InitiateSystemShutdown(p, mem_ctx, "spottyfood", 30)) - ret = False; - - if(!test_AbortSystemShutdown(p, mem_ctx)) - ret = False; + if (lp_parm_int(-1, "torture", "dangerous") != 1) { + printf("winreg_InitiateShutdown disabled - enable dangerous tests to use\n"); + + ret &= test_InitiateSystemShutdown(p, mem_ctx, "spottyfood", 30); + ret &= test_AbortSystemShutdown(p, mem_ctx); + } for (i = 0; i < ARRAY_SIZE(open_fns); i++) { if (!test_Open(p, mem_ctx, open_fns[i])) -- cgit