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

tridge at samba.org tridge at samba.org
Thu Aug 4 04:21:53 GMT 2005


Author: tridge
Date: 2005-08-04 04:21:52 +0000 (Thu, 04 Aug 2005)
New Revision: 9045

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

Log:
be friendly towards servers that don't understand the 'share' form for tconx, instead of the \\server\share
form









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


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/context.c
===================================================================
--- branches/SAMBA_4_0/source/torture/raw/context.c	2005-08-04 04:21:03 UTC (rev 9044)
+++ branches/SAMBA_4_0/source/torture/raw/context.c	2005-08-04 04:21:52 UTC (rev 9045)
@@ -262,7 +262,7 @@
 {
 	NTSTATUS status;
 	BOOL ret = True;
-	const char *share;
+	const char *share, *host;
 	struct smbcli_tree *tree;
 	union smb_tcon tcon;
 	union smb_open io;
@@ -279,6 +279,7 @@
 	}
 
 	share = lp_parm_string(-1, "torture", "share");
+	host  = lp_parm_string(-1, "torture", "host");
 	
 	printf("create a second tree context on the same session\n");
 	tree = smbcli_tree_init(cli->session, mem_ctx, False);
@@ -286,10 +287,11 @@
 	tcon.generic.level = RAW_TCON_TCONX;
 	tcon.tconx.in.flags = 0;
 	tcon.tconx.in.password = data_blob(NULL, 0);
-	tcon.tconx.in.path = share;
+	tcon.tconx.in.path = talloc_asprintf(mem_ctx, "\\\\%s\\%s", host, share);
 	tcon.tconx.in.device = "A:";	
 	status = smb_tree_connect(tree, mem_ctx, &tcon);
 	CHECK_STATUS(status, NT_STATUS_OK);
+	
 
 	tree->tid = tcon.tconx.out.tid;
 	printf("tid1=%d tid2=%d\n", cli->tree->tid, tree->tid);



More information about the samba-cvs mailing list