diff options
author | Gerald Carter <jerry@samba.org> | 2005-03-23 15:36:48 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:56:14 -0500 |
commit | 97978aa86577375ab035ce76b4af6a1acb13f78e (patch) | |
tree | aa63280b79aaf8796b1a5a47bdaec5736f91314f /source3/libsmb/cliconnect.c | |
parent | a49c567d4a6983098c74c23e3e65acbcbea1721b (diff) | |
download | samba-97978aa86577375ab035ce76b4af6a1acb13f78e.tar.gz samba-97978aa86577375ab035ce76b4af6a1acb13f78e.tar.bz2 samba-97978aa86577375ab035ce76b4af6a1acb13f78e.zip |
r5994: proper fix for smbclient and win98 file servers; check the WCT value in the tcon&X reply before setting the cli_state->dfsroot flag
(This used to be commit d3822d889dbc0812335e9242566256a0f88bc00d)
Diffstat (limited to 'source3/libsmb/cliconnect.c')
-rw-r--r-- | source3/libsmb/cliconnect.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index c5154827c6..4208d6378d 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -982,8 +982,12 @@ BOOL cli_send_tconX(struct cli_state *cli, cli->win95 = True; } - if ( cli->protocol >= PROTOCOL_LANMAN2 ) - cli->dfsroot = (SVAL( cli->inbuf, smb_vwv2 ) & SMB_SHARE_IN_DFS); + /* Make sure that we have the optional support 16-bit field. WCT > 2 */ + /* Avoids issues when connecting to Win9x boxes sharing files */ + + cli->dfsroot = False; + if ( (CVAL(cli->inbuf, smb_wct))>2 && cli->protocol >= PROTOCOL_LANMAN2 ) + cli->dfsroot = (SVAL( cli->inbuf, smb_vwv2 ) & SMB_SHARE_IN_DFS) ? True : False; cli->cnum = SVAL(cli->inbuf,smb_tid); return True; |