diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-12-12 00:35:50 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:07:20 -0500 |
commit | 65e688f5ddb91ffe3f04c0ed07860d53fe5bf48d (patch) | |
tree | 5458f0cdcb5ee1a48de7fddea741ccb110bcbaa2 | |
parent | 59cfd5495eb16550303994a0b04503eb2ae96f4a (diff) | |
download | samba-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)
-rw-r--r-- | source4/librpc/idl/winreg.idl | 10 | ||||
-rw-r--r-- | source4/torture/rpc/winreg.c | 19 |
2 files changed, 16 insertions, 13 deletions
diff --git a/source4/librpc/idl/winreg.idl b/source4/librpc/idl/winreg.idl index c80130c9af..5b7530aae3 100644 --- a/source4/librpc/idl/winreg.idl +++ b/source4/librpc/idl/winreg.idl @@ -262,17 +262,17 @@ /******************/ /* Function: 0x18 */ WERROR winreg_InitiateSystemShutdown( - [in] winreg_String hostname, - [in] winreg_String message, + [in] uint16 *hostname, + [in] winreg_String *message, [in] uint32 timeout, - [in] uint16 flags, - [out] uint16 status + [in] uint8 force_apps, + [in] uint8 reboot ); /******************/ /* Function: 0x19 */ WERROR winreg_AbortSystemShutdown( - [in,ref] uint16 *server + [in] uint16 *server ); /******************/ 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])) |