summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-20 03:18:07 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-20 03:18:07 +0000
commit52cae6b9088cae3c2daa8d195dcaba0c481a87d3 (patch)
tree6f3166e981ea43726dd511b1439d2970225040fe /source4/torture/rpc
parent308cc429eb7c07d94609f2818e9d81239cb4cbb9 (diff)
downloadsamba-52cae6b9088cae3c2daa8d195dcaba0c481a87d3.tar.gz
samba-52cae6b9088cae3c2daa8d195dcaba0c481a87d3.tar.bz2
samba-52cae6b9088cae3c2daa8d195dcaba0c481a87d3.zip
added samr_LookupRids() and test code
(This used to be commit c32c33a791dd42676ca7fa47aae264e8d8ea8339)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/samr.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 404456ddee..4774a62ebd 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -338,6 +338,7 @@ static BOOL test_EnumDomainUsers(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
int i;
BOOL ret = True;
struct samr_LookupNames n;
+ struct samr_LookupRids lr ;
printf("Testing EnumDomainUsers\n");
@@ -377,7 +378,21 @@ static BOOL test_EnumDomainUsers(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
status = dcerpc_samr_LookupNames(p, mem_ctx, &n);
if (!NT_STATUS_IS_OK(status)) {
printf("LookupNames failed - %s\n", nt_errstr(status));
- return False;
+ ret = False;
+ }
+
+
+ printf("Testing LookupRids\n");
+ lr.in.handle = handle;
+ lr.in.num_rids = r.out.sam->count;
+ lr.in.rids = talloc(mem_ctx, r.out.sam->count * sizeof(uint32));
+ for (i=0;i<r.out.sam->count;i++) {
+ lr.in.rids[i] = r.out.sam->entries[i].idx;
+ }
+ status = dcerpc_samr_LookupRids(p, mem_ctx, &lr);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("LookupRids failed - %s\n", nt_errstr(status));
+ ret = False;
}
return ret;