From 44c107e3a3349bcc13d489ba8731980aefc09ccc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 14 May 2004 00:24:00 +0000 Subject: r713: added a NetShareGetInfo torture test (thanks to abartlet for pointing out that this was missing) (This used to be commit 00916f236d3437a9080614d20a3ab589be6f9196) --- source4/torture/rpc/srvsvc.c | 45 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'source4') diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c index d7f9a7004b..8985956f5c 100644 --- a/source4/torture/rpc/srvsvc.c +++ b/source4/torture/rpc/srvsvc.c @@ -117,6 +117,36 @@ static BOOL test_NetSessEnum(struct dcerpc_pipe *p, return True; } + +static BOOL test_NetShareGetInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, + const char *sharename) +{ + NTSTATUS status; + struct srvsvc_NetShareGetInfo r; + int levels[] = {0, 1, 2, 501, 502, 1005}; + int i; + BOOL ret = True; + + r.in.server_unc = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p)); + r.in.share_name = ""; + + for (i=0;icount;j++) { + const char *name; + name = r.out.ctr.ctr1->array[j].name; + if (!test_NetShareGetInfo(p, mem_ctx, name)) { + ret = False; + } + } } + } return True; -- cgit