changed BCC handling for SMBwriteX to handle broken MacOSX client
authorAndrew Tridgell <tridge@samba.org>
Wed, 5 Aug 2009 10:23:12 +0000 (20:23 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 5 Aug 2009 10:24:01 +0000 (20:24 +1000)
commit3854b5e6146ff8efeb4379a502bb083cbaa05ce4
treeef46deaa2dadf39bba7b9da8a181520b3ac52db9
parent67b6f5784ae8d2e5c5b783b24a4b0ff555a28d44
changed BCC handling for SMBwriteX to handle broken MacOSX client

see bug #6610

The MacOSX SMB client sets the BCC value in SMBwriteX calls to zero
instead of the correct size. Checking against WindowsXP, I've found
that Windows uses the maximum of the computed buffer size and the
given BCC value. I've changed Samba4 to do the same to allow MacOSX to
work.

I've limited this change to non-chained packets to ensure we don't get
the possibility of exploits based on overlapping chained requests
source4/smb_server/smb/receive.c