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

metze at samba.org metze at samba.org
Fri Nov 24 15:50:22 GMT 2006


Author: metze
Date: 2006-11-24 15:50:18 +0000 (Fri, 24 Nov 2006)
New Revision: 19875

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

Log:
set torture:host and torture:share also when we are given a binding string

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


Changeset:
Modified: branches/SAMBA_4_0/source/torture/smbtorture.c
===================================================================
--- branches/SAMBA_4_0/source/torture/smbtorture.c	2006-11-24 07:10:01 UTC (rev 19874)
+++ branches/SAMBA_4_0/source/torture/smbtorture.c	2006-11-24 15:50:18 UTC (rev 19875)
@@ -250,18 +250,6 @@
 	exit(1);
 }
 
-static bool is_binding_string(const char *binding_string)
-{
-	TALLOC_CTX *mem_ctx = talloc_named_const(NULL, 0, "is_binding_string");
-	struct dcerpc_binding *binding_struct;
-	NTSTATUS status;
-	
-	status = dcerpc_parse_binding(mem_ctx, binding_string, &binding_struct);
-
-	talloc_free(mem_ctx);
-	return NT_STATUS_IS_OK(status);
-}
-
 static void max_runtime_handler(int sig)
 {
 	DEBUG(0,("maximum runtime exceeded for smbtorture - terminating\n"));
@@ -516,6 +504,8 @@
 	poptContext pc;
 	static const char *target = "other";
 	const char **subunit_dir;
+	struct dcerpc_binding *binding_struct;
+	NTSTATUS status;
 	int shell = False;
 	static const char *ui_ops_name = "simple";
 	enum {OPT_LOADFILE=1000,OPT_UNCLIST,OPT_TIMELIMIT,OPT_DNS,
@@ -645,7 +635,10 @@
 	}
 
 	/* see if its a RPC transport specifier */
-	if (is_binding_string(argv_new[1])) {
+	status = dcerpc_parse_binding(talloc_autofree_context(), argv_new[1], &binding_struct);
+	if (NT_STATUS_IS_OK(status)) {
+		lp_set_cmdline("torture:host", binding_struct->host);
+		lp_set_cmdline("torture:share", "IPC$");
 		lp_set_cmdline("torture:binding", argv_new[1]);
 	} else {
 		char *binding = NULL;



More information about the samba-cvs mailing list