diff options
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/rpc/lsa.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c index 5b3844396e..726281e0d6 100644 --- a/source4/torture/rpc/lsa.c +++ b/source4/torture/rpc/lsa.c @@ -332,6 +332,31 @@ static BOOL test_EnumAccountRights(struct dcerpc_pipe *p, return True; } + +static BOOL test_QuerySecObj(struct dcerpc_pipe *p, + TALLOC_CTX *mem_ctx, + struct policy_handle *acct_handle, + struct dom_sid *sid) +{ + NTSTATUS status; + struct lsa_QuerySecObj r; + + printf("Testing QuerySecObj\n"); + + r.in.handle = acct_handle; + r.in.sec_info = 7; + + status = dcerpc_lsa_QuerySecObj(p, mem_ctx, &r); + if (!NT_STATUS_IS_OK(status)) { + printf("QuerySecObj failed - %s\n", nt_errstr(status)); + return False; + } + + NDR_PRINT_DEBUG(sec_desc_buf, r.out.sd); + + return True; +} + static BOOL test_OpenAccount(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *handle, @@ -358,6 +383,10 @@ static BOOL test_OpenAccount(struct dcerpc_pipe *p, return False; } + if (!test_QuerySecObj(p, mem_ctx, handle, &acct_handle)) { + return False; + } + return True; } |