[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-728-gf13763c

Jeremy Allison jra at samba.org
Sun Apr 12 22:36:20 GMT 2009


The branch, v3-4-test has been updated
       via  f13763ca4be49c08dfc533e39dd338b508ba4709 (commit)
      from  17962ba589f24b7d2a67474978d06e33adad56c2 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test


- Log -----------------------------------------------------------------
commit f13763ca4be49c08dfc533e39dd338b508ba4709
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Apr 12 12:52:42 2009 +0200

    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

-----------------------------------------------------------------------

Summary of changes:
 source3/libsmb/clidfs.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index 430807e..98b96cf 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);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list