Connecting to Win2K via port 445 and etc

Richard Sharpe rsharpe at richardsharpe.com
Wed Mar 5 02:59:33 GMT 2003


Hi,

based on a change that Jeremy made today relating to Win2K via 445, I 
wonder if the following code in cli_send_tconX (head) is perhaps still a 
bit wrong

        if (cli->port == 445) {
                slprintf(fullshare, sizeof(fullshare)-1,
                         "%s", share);
        } else {
                slprintf(fullshare, sizeof(fullshare)-1,
                         "\\\\%s\\%s", cli->desthost, share);
        }

What this is doing is for port 139 consructing \\server\share, while for 
port 445, simply using the share name. All the code that calls 
cli_send_tconX should pass just the share name.

There is also the additional issue that if the server was specified by a 
name other than its NetBIOS name, and we are talking to a Win9x system, it 
will want the actual NetBIOS name there perhaps.

However, I wonder also if the code should do exactly the same for port 445 
and 139?

Regards
-----
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org, 
sharpe[at]ethereal.com, http://www.richardsharpe.com



More information about the samba-technical mailing list