summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-10-30 16:59:03 +0100
committerGünther Deschner <gd@samba.org>2008-10-31 02:44:33 +0100
commit8f99170ab94173670900677810def6893fd95024 (patch)
treee60b9b9439d363eacbee32936a381d76d1f8feb4 /source4/torture
parentd1340df8b80c4dbe9f37dffa315a26396ed4f93f (diff)
downloadsamba-8f99170ab94173670900677810def6893fd95024.tar.gz
samba-8f99170ab94173670900677810def6893fd95024.tar.bz2
samba-8f99170ab94173670900677810def6893fd95024.zip
s4-srvsvc: merge srvsvc_NetConnEnum from s3 idl.
Guenther
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/srvsvc.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index cda2d44e71..b6f2f8a49e 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -291,22 +291,38 @@ static bool test_NetConnEnum(struct torture_context *tctx,
{
NTSTATUS status;
struct srvsvc_NetConnEnum r;
+ struct srvsvc_NetConnInfoCtr info_ctr;
struct srvsvc_NetConnCtr0 c0;
+ struct srvsvc_NetConnCtr1 c1;
+ uint32_t totalentries = 0;
uint32_t levels[] = {0, 1};
int i;
+ ZERO_STRUCT(info_ctr);
+
r.in.server_unc = talloc_asprintf(tctx,"\\\\%s",dcerpc_server_name(p));
r.in.path = talloc_asprintf(tctx,"%s","ADMIN$");
- 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 NetConnEnum 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;
+ }
+
+ torture_comment(tctx, "testing NetConnEnum level %u\n", info_ctr.level);
status = dcerpc_srvsvc_NetConnEnum(p, tctx, &r);
torture_assert_ntstatus_ok(tctx, status, "NetConnEnum failed");
if (!W_ERROR_IS_OK(r.out.result)) {