svn commit: samba r8939 - in branches/SAMBA_4_0/source/torture/rpc: .

abartlet at samba.org abartlet at samba.org
Tue Aug 2 20:08:23 GMT 2005


Author: abartlet
Date: 2005-08-02 20:08:23 +0000 (Tue, 02 Aug 2005)
New Revision: 8939

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8939

Log:
Do an open domain in the schannel SAMR test.  This should test some of
the win2k3 SP1 interactions.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/torture/rpc/schannel.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/schannel.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/schannel.c	2005-08-02 19:48:42 UTC (rev 8938)
+++ branches/SAMBA_4_0/source/torture/rpc/schannel.c	2005-08-02 20:08:23 UTC (rev 8939)
@@ -34,12 +34,39 @@
 {
 	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 */



More information about the samba-cvs mailing list