r9045: be friendly towards servers that don't understand the 'share' form for tconx...
authorAndrew Tridgell <tridge@samba.org>
Thu, 4 Aug 2005 04:21:52 +0000 (04:21 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:31:11 +0000 (13:31 -0500)
form
(This used to be commit 02a78d06e1018087859c9ec65b792b1ffcfd3981)

source4/torture/raw/context.c

index 5b094d722fbd90f5daa251ea05cc66c81ace1aa5..61747f5dc494ca5abd114b62424009bc7d6abf36 100644 (file)
@@ -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);