What is the purpose of CAP_LARGE_READX?

George K Colley gcolley at apple.com
Thu Jan 17 15:59:22 MST 2013


On Jan 17, 2013, at 1:44 PM, Andrew Bartlett <abartlet at samba.org> wrote:

> I'm chasing a bug where a MacOSX client asks for 64k of data, we ignore
> the high bits, and return 0 bytes.  The client then writes a 64k zero
> page locally. 
> 
> The formal bug report will follow once I clear the details with the
> reporter, but it raised in my head some 'meta' questions.
> 
> What is the purpose of CAP_LARGE_READX?  The Samba smbd file server only
> mentions it to claim support for it in negprot, but does not use it in
> reply.c since
> https://git.samba.org/?p=samba.git;a=commitdiff;h=f8c26c16b82989e002b839fc9eba6386fc036f6a
> 

The CAP_LARGE_READX says that the client can do a read request that is bigger that the max buffer size negotiated.
The CAP_LARGE_WRITEX says that the client can do a write request that is bigger that the max buffer size negotiated.


If the server is windows then this size is 60K, for UNIX server the size can be up to 126k.

Because of a bug in Windows, if the connection is doing signing and the server is Windows then the client will turn off the CAP_LARGE_WRITEX bit. The bug does not affect CAP_LARGE_READX. 

> I would say 'so, we should not advertise it', but the trace I've been
> given of Win2008R2 also claims the same flag, but that patch claims it
> also isn't supported.
> 
> If the only way to do large reads and writes with SMB1 is via the unix
> extensions, what is the purpose of the capability flag?

UNIX extensions do not affect the large buffer.
> 
> Andrew Bartlett
> 
> -- 
> Andrew Bartlett                                http://samba.org/~abartlet/
> Authentication Developer, Samba Team           http://samba.org
> 
> 



More information about the samba-technical mailing list