summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-08-02 20:08:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:30:59 -0500
commit1439697d339e5a866589d425d8d1a1e74b553ff3 (patch)
tree99fc6ece35cb9ba2379fe9c1989f7a37db855243
parent23926e75c65ff4ca5226be0193c14073552a4344 (diff)
downloadsamba-1439697d339e5a866589d425d8d1a1e74b553ff3.tar.gz
samba-1439697d339e5a866589d425d8d1a1e74b553ff3.tar.bz2
samba-1439697d339e5a866589d425d8d1a1e74b553ff3.zip
r8939: Do an open domain in the schannel SAMR test. This should test some of
the win2k3 SP1 interactions. Andrew Bartlett (This used to be commit ebd96e68d6d7f92b781df0c43970e0dab4a30d6e)
-rw-r--r--source4/torture/rpc/schannel.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c
index 164da6ceef..580c6f57eb 100644
--- a/source4/torture/rpc/schannel.c
+++ b/source4/torture/rpc/schannel.c
@@ -34,12 +34,39 @@ static BOOL test_samr_ops(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
{
NTSTATUS status;
struct samr_GetDomPwInfo r;
+ struct samr_Connect connect;
+ struct samr_OpenDomain opendom;
int i;
struct lsa_String name;
+ struct policy_handle handle;
+ struct policy_handle domain_handle;
name.string = lp_workgroup();
r.in.domain_name = &name;
+ connect.in.system_name = 0;
+ connect.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
+ connect.out.connect_handle = &handle;
+
+ printf("Testing Connect and OpenDomain on BUILTIN\n");
+
+ status = dcerpc_samr_Connect(p, mem_ctx, &connect);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("Connect failed - %s\n", nt_errstr(status));
+ return False;
+ }
+
+ opendom.in.connect_handle = &handle;
+ opendom.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
+ opendom.in.sid = dom_sid_parse_talloc(mem_ctx, "S-1-5-32");
+ opendom.out.domain_handle = &domain_handle;
+
+ status = dcerpc_samr_OpenDomain(p, mem_ctx, &opendom);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("OpenDomain failed - %s\n", nt_errstr(status));
+ return False;
+ }
+
printf("Testing GetDomPwInfo with name %s\n", r.in.domain_name->string);
/* do several ops to test credential chaining */