diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-03-17 20:28:01 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:11:05 -0500 |
commit | ef213b02482194a8fed7f37123e08624072694b2 (patch) | |
tree | 12e82a6e21263f07cf87432701dc7af776daef6f /source4/torture/rpc/winreg.c | |
parent | 85943483fbcbe5e8a4cfb93eb65ac50f73eff28c (diff) | |
download | samba-ef213b02482194a8fed7f37123e08624072694b2.tar.gz samba-ef213b02482194a8fed7f37123e08624072694b2.tar.bz2 samba-ef213b02482194a8fed7f37123e08624072694b2.zip |
r5866: Add InitShutdown IDL and torture test.
Implement push side of NDR_LEN4|NDR_NOTERM strings (pull side was already present)
(This used to be commit ea61ec1122841716ed5d90085ba79e7bf691bd6a)
Diffstat (limited to 'source4/torture/rpc/winreg.c')
-rw-r--r-- | source4/torture/rpc/winreg.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c index 9d259ae47a..df0114b669 100644 --- a/source4/torture/rpc/winreg.c +++ b/source4/torture/rpc/winreg.c @@ -23,6 +23,12 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_winreg.h" +static void init_initshutdown_String(TALLOC_CTX *mem_ctx, struct initshutdown_String *name, const char *s) +{ + name->name = talloc(mem_ctx, struct initshutdown_String_sub); + name->name->name = s; +} + static void init_winreg_String(struct winreg_String *name, const char *s) { name->name = s; @@ -555,10 +561,11 @@ static BOOL test_InitiateSystemShutdown(struct dcerpc_pipe *p, TALLOC_CTX *mem_c { struct winreg_InitiateSystemShutdown r; NTSTATUS status; + uint16_t hostname = 0x0; - r.in.hostname = NULL; - r.in.message = talloc(mem_ctx, struct winreg_String); - init_winreg_String(r.in.message, msg); + r.in.hostname = &hostname; + r.in.message = talloc(mem_ctx, struct initshutdown_String); + init_initshutdown_String(mem_ctx, r.in.message, msg); r.in.force_apps = 1; r.in.timeout = timeout; r.in.reboot = 1; @@ -583,10 +590,11 @@ static BOOL test_InitiateSystemShutdownEx(struct dcerpc_pipe *p, TALLOC_CTX *mem { struct winreg_InitiateSystemShutdownEx r; NTSTATUS status; + uint16_t hostname = 0x0; - r.in.hostname = NULL; - r.in.message = talloc(mem_ctx, struct winreg_String); - init_winreg_String(r.in.message, msg); + r.in.hostname = &hostname; + r.in.message = talloc(mem_ctx, struct initshutdown_String); + init_initshutdown_String(mem_ctx, r.in.message, msg); r.in.force_apps = 1; r.in.timeout = timeout; r.in.reboot = 1; |