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

jelmer at samba.org jelmer at samba.org
Mon Oct 18 15:33:34 GMT 2004


Author: jelmer
Date: 2004-10-18 15:33:34 +0000 (Mon, 18 Oct 2004)
New Revision: 3045

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/torture&rev=3045&nolog=1

Log:
Allow object-uuid at ... binding strings

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


Changeset:
Modified: branches/SAMBA_4_0/source/torture/torture.c
===================================================================
--- branches/SAMBA_4_0/source/torture/torture.c	2004-10-18 15:26:16 UTC (rev 3044)
+++ branches/SAMBA_4_0/source/torture/torture.c	2004-10-18 15:33:34 UTC (rev 3045)
@@ -3553,6 +3553,18 @@
 	exit(1);
 }
 
+static BOOL is_binding_string(const char *binding_string)
+{
+	TALLOC_CTX *mem_ctx = talloc_init("is_binding_string");
+	struct dcerpc_binding binding_struct;
+	NTSTATUS status;
+	
+	status = dcerpc_parse_binding(mem_ctx, binding_string, &binding_struct);
+
+	talloc_destroy(mem_ctx);
+	return NT_STATUS_IS_OK(status);
+}
+
 /****************************************************************************
   main program
 ****************************************************************************/
@@ -3648,7 +3660,7 @@
 	}
 
 	/* see if its a RPC transport specifier */
-	if (strncmp(argv_new[1], "ncacn_", 6) == 0) {
+	if (is_binding_string(argv_new[1])) {
 		lp_set_cmdline("torture:binding", argv_new[1]);
 	} else {
 		char *binding = NULL;



More information about the samba-cvs mailing list