summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/samr.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-15 10:58:29 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-15 10:58:29 +0000
commite92419e2d35126f98af6c22fe5e0224421998aad (patch)
tree25b71827fbc7bdb25f76d6253d93c2ed378a9d13 /source4/torture/rpc/samr.c
parent54ccb9c6a2510c3e76603459f09d911c1dc3354e (diff)
downloadsamba-e92419e2d35126f98af6c22fe5e0224421998aad.tar.gz
samba-e92419e2d35126f98af6c22fe5e0224421998aad.tar.bz2
samba-e92419e2d35126f98af6c22fe5e0224421998aad.zip
added samr_UserInfo2 and samr_UserInfo3
(This used to be commit 5e852f694c039ae8bde3490be9e0c4959c1e93f0)
Diffstat (limited to 'source4/torture/rpc/samr.c')
-rw-r--r--source4/torture/rpc/samr.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 21e2005d96..8cafb4a2f5 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -26,21 +26,27 @@ static BOOL test_QueryUserInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
struct samr_QueryUserInfo r;
+ uint16 levels[] = {1, 2, 3};
+ int i;
+ BOOL ret = True;
- printf("Testing QueryUserInfo\n");
+ for (i=0;i<ARRAY_SIZE(levels);i++) {
+ printf("Testing QueryUserInfo level %u\n", levels[i]);
- r.in.handle = handle;
- r.in.level = 1;
+ r.in.handle = handle;
+ r.in.level = levels[i];
- status = dcerpc_samr_QueryUserInfo(p, mem_ctx, &r);
- if (!NT_STATUS_IS_OK(status)) {
- printf("QueryUserInfo failed - %s\n", nt_errstr(status));
- return False;
- }
+ status = dcerpc_samr_QueryUserInfo(p, mem_ctx, &r);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("QueryUserInfo level %u failed - %s\n",
+ levels[i], nt_errstr(status));
+ ret = False;
+ }
- NDR_PRINT_UNION_DEBUG(samr_UserInfo, r.in.level, r.out.info);
+ NDR_PRINT_UNION_DEBUG(samr_UserInfo, r.in.level, r.out.info);
+ }
- return True;
+ return ret;
}
static BOOL test_OpenUser(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,