[PATCH] smbclient fails with posix large reads
Andrew Bartlett
abartlet at samba.org
Fri Jan 27 14:50:12 MST 2012
On Fri, 2012-01-27 at 13:39 -0800, Jeremy Allison wrote:
> On Fri, Jan 27, 2012 at 11:56:13AM +1100, Andrew Bartlett wrote:
> > smbclient3 in master fails when we attempt to use the posix extensions
> > to read 16MB chucks at a time. Attached is a fix, which also applies to
> > (at least) 3.5.
> >
> > to reproduce:
> >
> > smbclient //server/tmp
> >
> > posix
> > get large_file
> >
> > I've CC'd Alex who found the issue.
> >
> > The simple issue is that smb_buffer_oob fails because it is told the
> > incorrect packet size, not taking into account that the packet may be a
> > large read&X. There are lot of calls to smb_len() in the code - I
> > suspect this may not be the only one wrong...
> >
> > Given this was for an OOB check, I wanted to run it past the list to
> > double-check it.
>
> LGTM - I'm pushing it to master (and the associated test).
>
> I'll raise a bug to get it applied to 3.6.x also.
For 3.5 the macro name changed, here is the patch.
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-s3-libsmb-Do-not-limit-read-replies-to-NBT-packet-si.patch
Type: text/x-patch
Size: 1183 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20120128/429ad8a9/attachment.bin>
More information about the samba-technical
mailing list