summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-08-04 04:21:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:31:11 -0500
commit89cbdf8ed0025c4bb06925f8a3bebb3565450def (patch)
tree0f8cf509eda819b3a61126194f5d9a6bdd964b3b /source4
parent177423e88ce4b0cad1328d2a85a59b214b055686 (diff)
downloadsamba-89cbdf8ed0025c4bb06925f8a3bebb3565450def.tar.gz
samba-89cbdf8ed0025c4bb06925f8a3bebb3565450def.tar.bz2
samba-89cbdf8ed0025c4bb06925f8a3bebb3565450def.zip
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)
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/raw/context.c6
1 files 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);