summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-12-19 05:53:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:31 -0500
commit9b3ea6dc4e13a91e2f87123e1a8e6a8b6e091b76 (patch)
treefafabc06e64817894e5e748f2929d4df7b514232 /source4/torture/rpc
parentc6a420fd1ebe3f95d1c463469868e00b048e92c8 (diff)
downloadsamba-9b3ea6dc4e13a91e2f87123e1a8e6a8b6e091b76.tar.gz
samba-9b3ea6dc4e13a91e2f87123e1a8e6a8b6e091b76.tar.bz2
samba-9b3ea6dc4e13a91e2f87123e1a8e6a8b6e091b76.zip
r4277: - added server support for lsa_EnumAccounts()
- expanded the lsa test suite to better test lsa_EnumAccounts() (This used to be commit bafdb1772977d98fd57bb31a328af7cb1deee788)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/lsa.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 84fd246538..3b7635f13b 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -702,26 +702,31 @@ static BOOL test_EnumAccounts(struct dcerpc_pipe *p,
r.out.sids = &sids1;
resume_handle = 0;
- status = dcerpc_lsa_EnumAccounts(p, mem_ctx, &r);
- if (!NT_STATUS_IS_OK(status)) {
- printf("EnumAccounts failed - %s\n", nt_errstr(status));
- return False;
- }
+ while (True) {
+ status = dcerpc_lsa_EnumAccounts(p, mem_ctx, &r);
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NO_MORE_ENTRIES)) {
+ break;
+ }
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("EnumAccounts failed - %s\n", nt_errstr(status));
+ return False;
+ }
- if (!test_LookupSids(p, mem_ctx, handle, &sids1)) {
- return False;
- }
+ if (!test_LookupSids(p, mem_ctx, handle, &sids1)) {
+ return False;
+ }
- if (!test_LookupSids2(p, mem_ctx, handle, &sids1)) {
- return False;
- }
+ if (!test_LookupSids2(p, mem_ctx, handle, &sids1)) {
+ return False;
+ }
- printf("testing all accounts\n");
- for (i=0;i<sids1.num_sids;i++) {
- test_OpenAccount(p, mem_ctx, handle, sids1.sids[i].sid);
- test_EnumAccountRights(p, mem_ctx, handle, sids1.sids[i].sid);
+ printf("testing all accounts\n");
+ for (i=0;i<sids1.num_sids;i++) {
+ test_OpenAccount(p, mem_ctx, handle, sids1.sids[i].sid);
+ test_EnumAccountRights(p, mem_ctx, handle, sids1.sids[i].sid);
+ }
+ printf("\n");
}
- printf("\n");
if (sids1.num_sids < 3) {
return True;