Padding byte in cifs readx response
Volker.Lendecke at SerNet.DE
Mon Aug 11 09:27:38 MDT 2014
On Thu, Aug 07, 2014 at 04:16:45PM -0700, Christof Schmitt wrote:
> On Thu, Aug 07, 2014 at 04:43:49PM +0200, Volker Lendecke wrote:
> > On Wed, Aug 06, 2014 at 02:38:39PM -0700, Christof Schmitt wrote:
> > > Here is some progress. I still get a selftest failure with a large read
> > > request, so something must be wrong with the outbuf, but the tests i
> > > added succeed. I would like to get some feedback if my patches are the
> > > right approach, or if adding the padding byte can be simplified.
> > Find some comments attached. My main comment is: I'd like to avoid passing
> > down a boolean to create_outbuf and handle this by allocating another
> > byte at a higher level. Apart from that, I think this will inevitably
> > be dirty, our SMB1 read&x path just has to cover a lot of situations
> > where the data comes from.
> > Volker
> Thanks. Attached is an updated patch series. I think the only remaining
> issue is that 'make test' now fails against the source4 DC, the source3
> file server should be good.
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 0377c35..71db8ef 100644
@@ -3884,8 +3884,7 @@ normal_read:
- reply_outbuf(req, 12, smb_maxcnt);
- reply_outbuf_add_pad(req, 12, smb_maxcnt);
+ reply_outbuf(req, 12, smb_maxcnt+1);
SSVAL(req->outbuf, smb_vwv0, 0xff); /* andx chain ends */
SSVAL(req->outbuf, smb_vwv1, 0); /* no andx
Why does that not work?
Second question: In pipes.c I get the impression that the
code allocates the pad but still puts the data at a place
without the pad.
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
More information about the samba-technical