summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-15 04:42:48 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-15 04:42:48 +0000
commit099899a7cc01fab5faba82e59650aa76bac8143e (patch)
tree581b349e1562b198be22c46e3f6c2e1238a86e10 /source4/torture
parent5a1779b982569201decc8a09765d5361212813d7 (diff)
downloadsamba-099899a7cc01fab5faba82e59650aa76bac8143e.tar.gz
samba-099899a7cc01fab5faba82e59650aa76bac8143e.tar.bz2
samba-099899a7cc01fab5faba82e59650aa76bac8143e.zip
added lsa_QuerySecObj() and the necessary sec_desc_buf supporting code
also adding printing of security descriptors (This used to be commit 1f93cbc1d597b973ab1a5005ede093c1bcefff87)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/lsa.c29
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;
}