summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-12-12 00:35:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:20 -0500
commit65e688f5ddb91ffe3f04c0ed07860d53fe5bf48d (patch)
tree5458f0cdcb5ee1a48de7fddea741ccb110bcbaa2 /source4/torture
parent59cfd5495eb16550303994a0b04503eb2ae96f4a (diff)
downloadsamba-65e688f5ddb91ffe3f04c0ed07860d53fe5bf48d.tar.gz
samba-65e688f5ddb91ffe3f04c0ed07860d53fe5bf48d.tar.bz2
samba-65e688f5ddb91ffe3f04c0ed07860d53fe5bf48d.zip
r4158: Fix IDL for InitiateShutdown and AbortShutdown and run both only
when dangerous tests are enabled. (This used to be commit a763bd838558bdd7bcab3ca7ee91c1846d7a950f)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/winreg.c19
1 files changed, 11 insertions, 8 deletions
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]))