LARGE_WRITE_X

Jeremy Allison jra at samba.org
Tue Dec 14 18:17:04 GMT 2004


On Tue, Dec 14, 2004 at 02:47:40PM +1100, tridge at samba.org wrote:
> 
> In the packet recv code we cope with the incorrect bcc like this:
> 
> 		if (req->in.data_size + 0x10000 <= 
> 		    req->in.size - PTR_DIFF(req->in.data, req->in.buffer) &&
> 		    (req->in.wct < 1 || SVAL(req->in.vwv, VWV(0)) == SMB_CHAIN_NONE)) {
> 			/* its an oversized packet! fun for all the family */
> 			req->in.data_size = req->in.size - PTR_DIFF(req->in.data,req->in.buffer);
> 		}

Have you seen incorrect bcc values from Windows ?

> In readx we cope with large sizes like this:
> 
> 	if (req->smb_conn->negotiate.client_caps & CAP_LARGE_READX) {
> 		uint32_t high_part = IVAL(req->in.vwv, VWV(7));
> 		if (high_part == 1) {
> 			io->readx.in.maxcnt |= high_part << 16;
> 		}
> 	}
> 
> Note the ==1 check. That is important to cope as best as possible with
> possible uninitialised data in this field.

Ok, I'll add that check into the read_and_X code. That's an important
fix, thanks.

I'm not so concerned with Windows large readX/writeX if it has bugs.
Do you know if these SMBs are sent by default ? I'm more concerned
in making sure Steve's client works well with the Samba3 server code.

Jeremy.


More information about the samba-technical mailing list