From bfa370671bfce8fb9672fc4401232057b73f58ad Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 18 Apr 2004 04:32:04 +0000 Subject: r268: added IDL and test code for samr_QueryDomainInfo2(), samr_QueryUserInfo2(), samr_QueryDisplayInfo2() and samr_GetDisplayEnumerationIndex2() (This used to be commit fddda52500d482bde79994c14a0a822a1d305ac3) --- source4/torture/rpc/samr.c | 152 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 152 insertions(+) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index 9465dd135b..a098fbd9ca 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -32,6 +32,9 @@ static BOOL test_QueryUserInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *handle); +static BOOL test_QueryUserInfo2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, + struct policy_handle *handle); + static BOOL test_QueryAliasInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *handle); @@ -510,6 +513,10 @@ static BOOL test_user_ops(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, ret = False; } + if (!test_QueryUserInfo2(p, mem_ctx, handle)) { + ret = False; + } + if (!test_SetUserInfo(p, mem_ctx, handle)) { ret = False; } @@ -1034,6 +1041,33 @@ static BOOL test_QueryUserInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return ret; } +static BOOL test_QueryUserInfo2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, + struct policy_handle *handle) +{ + NTSTATUS status; + struct samr_QueryUserInfo2 r; + uint16 levels[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 16, 17, 20, 21}; + int i; + BOOL ret = True; + + for (i=0;i