Padding byte in cifs readx response

Christof Schmitt cs at
Wed Jul 30 17:34:01 MDT 2014

It was pointed out to me that a padding byte in the readx response is
 Pad (1 byte): This field is optional. When using the NT LAN Manager
dialect, this field can be used to align the Data field to a 16-bit
boundary relative to the start of the SMB Header. If Unicode strings are
being used, this field MUST be present. When used, this field MUST be
one padding byte long.

I wrote a simple test for this, and it succeeds against a Windows 7 and
fails in
make test

REASON: _StringException: _StringException:
../source4/torture/raw/read.c:441: data not 16 bit aligned
envlog: SMBD LOG of: LOCALS3DC2


More information about the samba-technical mailing list