From aa4aa0f99f81ea9eb9c3bfefafe8faa2b4b44c83 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 17 Dec 2003 02:35:04 +0000 Subject: fixed a bug in the acct_flags checking on CreateUser2 in the RPC-SAMR test (This used to be commit 2c9a999c5421a07ae3059595f70d5533f2040a03) --- source4/torture/rpc/samr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index 7ccdc321ce..2678f38254 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -330,7 +330,7 @@ static BOOL test_CreateUser(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, } - q.in.handle = handle; + q.in.handle = &acct_handle; q.in.level = 16; status = dcerpc_samr_QueryUserInfo(p, mem_ctx, &q); @@ -339,7 +339,7 @@ static BOOL test_CreateUser(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, q.in.level, nt_errstr(status)); ret = False; } else { - if (q.out.info->info16.acct_flags != acct_flags) { + if ((q.out.info->info16.acct_flags & acct_flags) != acct_flags) { printf("QuerUserInfo level 16 failed, it returned 0x%08x (%u) when we expected flags of 0x%08x (%u)\n", q.out.info->info16.acct_flags, q.out.info->info16.acct_flags, acct_flags, acct_flags); @@ -436,7 +436,7 @@ static BOOL test_CreateUser2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, } if (NT_STATUS_IS_OK(status)) { - q.in.handle = handle; + q.in.handle = &acct_handle; q.in.level = 16; status = dcerpc_samr_QueryUserInfo(p, mem_ctx, &q); @@ -445,8 +445,8 @@ static BOOL test_CreateUser2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, q.in.level, nt_errstr(status)); ret = False; } else { - if (q.out.info->info16.acct_flags != acct_flags) { - printf("QuerUserInfo level 16 failed, it returned 0x%08xwhen we expected flags of 0x%08x\n", + if ((q.out.info->info16.acct_flags & acct_flags) != acct_flags) { + printf("QuerUserInfo level 16 failed, it returned 0x%08x when we expected flags of 0x%08x\n", q.out.info->info16.acct_flags, acct_flags); ret = False; -- cgit