summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/samr.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-18 05:20:54 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-18 05:20:54 +0000
commit06d0f61aa43c0ab08dc122c9a3b41f9fc453fcbc (patch)
treeda7f6056f77d9722ee287e891d5fdfa97f401575 /source4/torture/rpc/samr.c
parent9b7b5e5c516155d9606cc92bd22a958a8435ef48 (diff)
downloadsamba-06d0f61aa43c0ab08dc122c9a3b41f9fc453fcbc.tar.gz
samba-06d0f61aa43c0ab08dc122c9a3b41f9fc453fcbc.tar.bz2
samba-06d0f61aa43c0ab08dc122c9a3b41f9fc453fcbc.zip
added samr_QuerySecurity() call that displays the ACL for any handle.
(This used to be commit 5bbeaaa3d13c838d014e7689b0fcf7374c8c7f57)
Diffstat (limited to 'source4/torture/rpc/samr.c')
-rw-r--r--source4/torture/rpc/samr.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index fddf97ef74..346a073723 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -40,6 +40,24 @@ static BOOL test_Close(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
+static BOOL test_QuerySecurity(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle)
+{
+ NTSTATUS status;
+ struct samr_QuerySecurity r;
+
+ r.in.handle = handle;
+ r.in.sec_info = 7;
+
+ status = dcerpc_samr_QuerySecurity(p, mem_ctx, &r);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("QuerySecurity failed - %s\n", nt_errstr(status));
+ return False;
+ }
+
+ return True;
+}
+
static BOOL test_QueryAliasInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct policy_handle *handle)
@@ -141,6 +159,10 @@ static BOOL test_OpenUser(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
+ if (!test_QuerySecurity(p, mem_ctx, &acct_handle)) {
+ ret = False;
+ }
+
if (!test_QueryUserInfo(p, mem_ctx, &acct_handle)) {
ret = False;
}
@@ -173,6 +195,10 @@ static BOOL test_OpenGroup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
+ if (!test_QuerySecurity(p, mem_ctx, &acct_handle)) {
+ ret = False;
+ }
+
if (!test_QueryGroupInfo(p, mem_ctx, &acct_handle)) {
ret = False;
}
@@ -205,6 +231,10 @@ static BOOL test_OpenAlias(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
+ if (!test_QuerySecurity(p, mem_ctx, &acct_handle)) {
+ ret = False;
+ }
+
if (!test_QueryAliasInfo(p, mem_ctx, &acct_handle)) {
ret = False;
}
@@ -370,6 +400,10 @@ static BOOL test_OpenDomain(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
+ if (!test_QuerySecurity(p, mem_ctx, &domain_handle)) {
+ ret = False;
+ }
+
if (!test_QueryDomainInfo(p, mem_ctx, &domain_handle)) {
ret = False;
}
@@ -511,6 +545,10 @@ BOOL torture_rpc_samr(int dummy)
ret = False;
}
+ if (!test_QuerySecurity(p, mem_ctx, &handle)) {
+ ret = False;
+ }
+
if (!test_EnumDomains(p, mem_ctx, &handle)) {
ret = False;
}