diff options
author | Rafal Szczesniak <mimir@samba.org> | 2006-11-27 22:40:53 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:28:37 -0500 |
commit | 740843e7fccd85b7adf258159543050fc1c12b99 (patch) | |
tree | bd216913d9727ae87e12e2627a6cf86854506657 /source4/torture/libnet | |
parent | 1f06299253ff219f2a13b848ff79188cc292d8e9 (diff) | |
download | samba-740843e7fccd85b7adf258159543050fc1c12b99.tar.gz samba-740843e7fccd85b7adf258159543050fc1c12b99.tar.bz2 samba-740843e7fccd85b7adf258159543050fc1c12b99.zip |
r19925: Close the lsa handle in the end, and test calling libnet_UserList
with non-zero resume index to continue longer enumeration.
rafal
(This used to be commit efa04d6d0b62ff3c6332db4b31622c0579428a56)
Diffstat (limited to 'source4/torture/libnet')
-rw-r--r-- | source4/torture/libnet/libnet_user.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/source4/torture/libnet/libnet_user.c b/source4/torture/libnet/libnet_user.c index 44aa38073c..3d507090fd 100644 --- a/source4/torture/libnet/libnet_user.c +++ b/source4/torture/libnet/libnet_user.c @@ -696,20 +696,31 @@ BOOL torture_userlist(struct torture_context *torture) ZERO_STRUCT(req); - req.in.domain_name = domain_name.string; - req.in.page_size = 30; - req.in.resume_index = 0; + do { - status = libnet_UserList(ctx, mem_ctx, &req); - if (!NT_STATUS_IS_OK(status)) { + req.in.domain_name = domain_name.string; + req.in.page_size = 128; + req.in.resume_index = req.out.resume_index; + + status = libnet_UserList(ctx, mem_ctx, &req); + + } while (NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES)); + + if (!(NT_STATUS_IS_OK(status) || + NT_STATUS_EQUAL(status, NT_STATUS_NO_MORE_ENTRIES))) { printf("libnet_UserList call failed: %s\n", nt_errstr(status)); ret = False; - talloc_free(mem_ctx); goto done; } if (!test_samr_close(ctx->samr.pipe, mem_ctx, &ctx->samr.handle)) { - printf("domain close failed\n"); + printf("samr domain close failed\n"); + ret = False; + goto done; + } + + if (!test_lsa_close(ctx->lsa.pipe, mem_ctx, &ctx->lsa.handle)) { + printf("lsa domain close failed\n"); ret = False; } |