From 89cbdf8ed0025c4bb06925f8a3bebb3565450def Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 4 Aug 2005 04:21:52 +0000 Subject: r9045: be friendly towards servers that don't understand the 'share' form for tconx, instead of the \\server\share form (This used to be commit 02a78d06e1018087859c9ec65b792b1ffcfd3981) --- source4/torture/raw/context.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source4/torture/raw/context.c b/source4/torture/raw/context.c index 5b094d722f..61747f5dc4 100644 --- a/source4/torture/raw/context.c +++ b/source4/torture/raw/context.c @@ -262,7 +262,7 @@ static BOOL test_tree(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) { 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 @@ static BOOL test_tree(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) } 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 @@ static BOOL test_tree(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) 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); -- cgit