diff options
author | Volker Lendecke <vl@samba.org> | 2009-04-12 12:52:42 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-04-12 14:51:15 +0200 |
commit | 602059a6ab8c4939dd453566415321b2b85706f4 (patch) | |
tree | dbaa2a712e4ebc45e279a06b83c56f5437687b01 /source3 | |
parent | b742b4547e9a5adb4c235995751bae5649be3031 (diff) | |
download | samba-602059a6ab8c4939dd453566415321b2b85706f4.tar.gz samba-602059a6ab8c4939dd453566415321b2b85706f4.tar.bz2 samba-602059a6ab8c4939dd453566415321b2b85706f4.zip |
Fix a bug in smbclient not sending the correct called name
Jeremy, I think the ability to say
smbclient //foo/bar -I <ip-address> -p 139
making the called name to "foo" got lost with 3d2d0203. Was this removed
deliberately? If so, please revert this patch. If not, please merge
appropriately.
Thanks,
Volker
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/clidfs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c index 430807eb7f..98b96cfc56 100644 --- a/source3/libsmb/clidfs.c +++ b/source3/libsmb/clidfs.c @@ -94,6 +94,7 @@ static struct cli_state *do_connect(TALLOC_CTX *ctx, { struct cli_state *c = NULL; struct nmb_name called, calling; + const char *called_str; const char *server_n; struct sockaddr_storage ss; char *servicename; @@ -111,6 +112,7 @@ static struct cli_state *do_connect(TALLOC_CTX *ctx, sharename = servicename; if (*sharename == '\\') { sharename += 2; + called_str = sharename; if (server == NULL) { server = sharename; } @@ -120,6 +122,8 @@ static struct cli_state *do_connect(TALLOC_CTX *ctx, } *sharename = 0; sharename++; + } else { + called_str = server; } server_n = server; @@ -127,7 +131,7 @@ static struct cli_state *do_connect(TALLOC_CTX *ctx, zero_sockaddr(&ss); make_nmb_name(&calling, global_myname(), 0x0); - make_nmb_name(&called , server, name_type); + make_nmb_name(&called , called_str, name_type); again: zero_sockaddr(&ss); |