diff options
-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])) |