summaryrefslogtreecommitdiff
path: root/source3/client/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/client/client.c')
-rw-r--r--source3/client/client.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 5da12fd984..4761b0ae5c 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -41,7 +41,6 @@ static pstring password;
static pstring username;
static pstring workgroup;
static char *cmdstr;
-static BOOL got_user;
static BOOL got_pass;
static int io_bufsize = 64512;
static BOOL use_kerberos;
@@ -2434,9 +2433,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 full_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(full_share, "\\\\");
+ pstrcat(full_share, server);
+ pstrcat(full_share, "\\");
+ pstrcat(full_share, sharename);
+ if (!cli_send_tconX(c, full_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"));
@@ -2875,8 +2889,6 @@ static void remember_query_host(const char *arg,
case 'U':
{
char *lp;
-
- got_user = True;
pstrcpy(username,optarg);
if ((lp=strchr_m(username,'%'))) {
*lp = 0;
@@ -2973,6 +2985,7 @@ static void remember_query_host(const char *arg,
case 'k':
#ifdef HAVE_KRB5
use_kerberos = True;
+ got_pass = True;
#else
d_printf("No kerberos support compiled in\n");
exit(1);
@@ -2984,9 +2997,6 @@ static void remember_query_host(const char *arg,
}
}
- if (use_kerberos && !got_user)
- got_pass = True;
-
init_names();
if(*new_name_resolve_order)