summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>2002-09-28 03:38:37 +0000
committerRichard Sharpe <sharpe@samba.org>2002-09-28 03:38:37 +0000
commit1e4ac9615d26bfbf90e3a45f088564f448f689ce (patch)
tree77415e01b165d754d9157cd7f6c2e51662424ab5 /source
parent2b54a2fc2c85ea139e2acdbbc2f14b969c0c6315 (diff)
downloadsamba-1e4ac9615d26bfbf90e3a45f088564f448f689ce.tar.gz
samba-1e4ac9615d26bfbf90e3a45f088564f448f689ce.tar.xz
samba-1e4ac9615d26bfbf90e3a45f088564f448f689ce.zip
Commit a fix to smbclient so that it will connect to EMCs and NetApp's machines.
Diffstat (limited to 'source')
-rw-r--r--source/client/client.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/source/client/client.c b/source/client/client.c
index eb6b5727608..de6bf0e1b05 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -2436,9 +2436,24 @@ static struct cli_state *do_connect(const char *server, const char *share)
if (!cli_send_tconX(c, sharename, "?????",
password, strlen(password)+1)) {
- d_printf("tree connect failed: %s\n", cli_errstr(c));
- cli_shutdown(c);
- return NULL;
+ pstring share;
+
+ /*
+ * Some servers require \\server\share for the share
+ * while others are happy with share as we gave above
+ * Lets see if we give it the long form if it works
+ */
+ pstrcpy(share, "\\\\");
+ pstrcat(share, server);
+ pstrcat(share, "\\");
+ pstrcat(share, sharename);
+ if (!cli_send_tconX(c, share, "?????", password,
+ strlen(password) + 1)) {
+
+ d_printf("tree connect failed: %s\n", cli_errstr(c));
+ cli_shutdown(c);
+ return NULL;
+ }
}
DEBUG(4,(" tconx ok\n"));