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

tridge at samba.org tridge at samba.org
Mon Jan 10 03:48:19 GMT 2005


Author: tridge
Date: 2005-01-10 03:48:19 +0000 (Mon, 10 Jan 2005)
New Revision: 4625

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

Log:
added a test that demonstrates that once a context_id is established,
it can't be changed (so you have to create a new context_id, not
change the interface bound to an existing one)

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


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/alter_context.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/alter_context.c	2005-01-09 21:35:37 UTC (rev 4624)
+++ branches/SAMBA_4_0/source/torture/rpc/alter_context.c	2005-01-10 03:48:19 UTC (rev 4625)
@@ -32,6 +32,8 @@
 	TALLOC_CTX *mem_ctx;
 	BOOL ret = True;
 	struct policy_handle handle;
+	struct dcerpc_syntax_id syntax;
+	struct dcerpc_syntax_id transfer_syntax;
 
 	mem_ctx = talloc_init("torture_rpc_alter_context");
 
@@ -69,6 +71,32 @@
 		ret = False;
 	}
 
+	syntax = p->syntax;
+	transfer_syntax = p->transfer_syntax;
+
+	printf("Testing change of primary context\n");
+	status = dcerpc_alter_context(p, mem_ctx, &p2->syntax, &p2->transfer_syntax);
+	if (!NT_STATUS_IS_OK(status)) {
+		printf("dcerpc_alter_context failed - %s\n", nt_errstr(status));
+		return False;
+	}
+
+	printf("testing DSSETUP pipe operations - should fault\n");
+	if (test_DsRoleGetPrimaryDomainInformation(p, mem_ctx)) {
+		ret = False;
+	}
+
+	if (!test_lsa_OpenPolicy2(p, mem_ctx, &handle)) {
+		ret = False;
+	}
+
+	if (!test_lsa_Close(p, mem_ctx, &handle)) {
+		ret = False;
+	}
+
+	printf("testing DSSETUP pipe operations\n");
+	ret &= test_DsRoleGetPrimaryDomainInformation(p2, mem_ctx);
+
 	talloc_destroy(mem_ctx);
 
         torture_rpc_close(p);



More information about the samba-cvs mailing list