summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-01-02 01:04:59 +0000
committerTim Potter <tpot@samba.org>2004-01-02 01:04:59 +0000
commit7db3bbc0482789efd68cd043459a1822a439f4da (patch)
tree8e31764cc2dfa3e3c0181572e1c0594499c33f26
parent2558f81a8d60435b6618f1c7b408117a765d94ff (diff)
downloadsamba-7db3bbc0482789efd68cd043459a1822a439f4da.tar.gz
samba-7db3bbc0482789efd68cd043459a1822a439f4da.tar.bz2
samba-7db3bbc0482789efd68cd043459a1822a439f4da.zip
Autodetect service_type in cli_tree_full_connection() if the caller
passes in NULL. (This used to be commit b63ebaa770940a276ab63583a13d8cc349b6efe6)
-rw-r--r--source4/libcli/raw/clitree.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/libcli/raw/clitree.c b/source4/libcli/raw/clitree.c
index 1e9104308e..1114c8a9c5 100644
--- a/source4/libcli/raw/clitree.c
+++ b/source4/libcli/raw/clitree.c
@@ -268,6 +268,12 @@ NTSTATUS cli_tree_full_connection(struct cli_tree **ret_tree,
tcon.tconx.in.flags = 0;
tcon.tconx.in.password = data_blob(NULL, 0);
asprintf(&tcon.tconx.in.path, "\\\\%s\\%s", dest_host, service);
+ if (!service_type) {
+ if (strequal(service, "IPC$"))
+ service_type = "IPC";
+ else
+ service_type = "?????";
+ }
tcon.tconx.in.device = service_type;
status = smb_tree_connect(tree, mem_ctx, &tcon);