diff options
author | Günther Deschner <gd@samba.org> | 2008-10-30 17:21:31 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-10-31 02:44:33 +0100 |
commit | 947e14adae7c858650789274c9761227eb1dd87c (patch) | |
tree | f62eed4ea23875ba9270c4bb2cc0bf8ca2c44c74 /source4/torture | |
parent | 546fb4028a8e94b35b2f7f8024871aaa24a20912 (diff) | |
download | samba-947e14adae7c858650789274c9761227eb1dd87c.tar.gz samba-947e14adae7c858650789274c9761227eb1dd87c.tar.bz2 samba-947e14adae7c858650789274c9761227eb1dd87c.zip |
s4-srvsvc: merge srvsvc_NetSessEnum from s3 idl.
Guenther
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/srvsvc.c | 43 |
1 files changed, 37 insertions, 6 deletions
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c index c3dd5b0e6f..783dfd328b 100644 --- a/source4/torture/rpc/srvsvc.c +++ b/source4/torture/rpc/srvsvc.c @@ -391,23 +391,54 @@ static bool test_NetSessEnum(struct torture_context *tctx, { NTSTATUS status; struct srvsvc_NetSessEnum r; + struct srvsvc_NetSessInfoCtr info_ctr; struct srvsvc_NetSessCtr0 c0; + struct srvsvc_NetSessCtr1 c1; + struct srvsvc_NetSessCtr2 c2; + struct srvsvc_NetSessCtr10 c10; + struct srvsvc_NetSessCtr502 c502; + uint32_t totalentries = 0; uint32_t levels[] = {0, 1, 2, 10, 502}; int i; + ZERO_STRUCT(info_ctr); + r.in.server_unc = talloc_asprintf(tctx,"\\\\%s",dcerpc_server_name(p)); r.in.client = NULL; r.in.user = NULL; - r.in.ctr.ctr0 = &c0; - r.in.ctr.ctr0->count = 0; - r.in.ctr.ctr0->array = NULL; + r.in.info_ctr = &info_ctr; r.in.max_buffer = (uint32_t)-1; r.in.resume_handle = NULL; + r.out.totalentries = &totalentries; + r.out.info_ctr = &info_ctr; for (i=0;i<ARRAY_SIZE(levels);i++) { - ZERO_STRUCT(r.out); - r.in.level = levels[i]; - torture_comment(tctx, "testing NetSessEnum level %u\n", r.in.level); + info_ctr.level = levels[i]; + + switch (info_ctr.level) { + case 0: + ZERO_STRUCT(c0); + info_ctr.ctr.ctr0 = &c0; + break; + case 1: + ZERO_STRUCT(c1); + info_ctr.ctr.ctr1 = &c1; + break; + case 2: + ZERO_STRUCT(c2); + info_ctr.ctr.ctr2 = &c2; + break; + case 10: + ZERO_STRUCT(c10); + info_ctr.ctr.ctr10 = &c10; + break; + case 502: + ZERO_STRUCT(c502); + info_ctr.ctr.ctr502 = &c502; + break; + } + + torture_comment(tctx, "testing NetSessEnum level %u\n", info_ctr.level); status = dcerpc_srvsvc_NetSessEnum(p, tctx, &r); torture_assert_ntstatus_ok(tctx, status, "NetSessEnum failed"); if (!W_ERROR_IS_OK(r.out.result)) { |