summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/client/client.c2
-rw-r--r--source4/libcli/raw/clitree.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/source4/client/client.c b/source4/client/client.c
index 5c72da1731..dc2883e6e2 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -2644,6 +2644,8 @@ static struct cli_state *do_connect(const char *server, const char *share)
sharename++;
}
+ asprintf(&sharename, "\\\\%s\\%s", server, sharename);
+
server_n = server;
zero_ip(&ip);
diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c
index 2a41273913..60e8610bd8 100644
--- a/source4/libcli/raw/clitree.c
+++ b/source4/libcli/raw/clitree.c
@@ -269,10 +269,13 @@ NTSTATUS cli_tree_full_connection(struct cli_tree **ret_tree,
tcon.generic.level = RAW_TCON_TCONX;
tcon.tconx.in.flags = 0;
tcon.tconx.in.password = data_blob(NULL, 0);
- tcon.tconx.in.path = service;
+ asprintf(&tcon.tconx.in.path, "\\\\%s\\%s", dest_host, service);
tcon.tconx.in.device = service_type;
status = smb_tree_connect(tree, mem_ctx, &tcon);
+
+ free(tcon.tconx.in.path);
+
if (!NT_STATUS_IS_OK(status)) {
cli_tree_close(tree);
talloc_destroy(mem_ctx);