s3:smb2: add padding to last command in compound requests
authorRalph Boehme <slow@samba.org>
Thu, 28 May 2015 07:02:17 +0000 (09:02 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 1 Jun 2015 21:46:18 +0000 (23:46 +0200)
commit9ba2dce359dbd2aff75a136428b825746103d43d
tree839f546f39f4d2e5ffd6856a94bb87f54516a792
parentdb283914bcfa38661f18ac89712c1e9eb949095b
s3:smb2: add padding to last command in compound requests

Following Windows behaviour, the last command in a compound request
should be padded to an 8 byte boundary and OS X clients crash badly if
we don't pad.

[MS-SMB2] 3.3.4.1.3, "Sending Compounded Responses", doesn't make it
clear whether the padding requirement governs the last command in a
compound response, a future MS-SMB2 update will document Windwows
product behaviour in a footnote.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11277

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit dfa64b958b201931e0dbe11f153f606f20217594)
source3/smbd/smb2_server.c