From bbb7cbfb7cdf5cbd9700cdfaced9e7582de9eff5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 15 Jun 2012 21:10:59 -0700 Subject: Same fix as bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does not send correct responses to NT Transact Secondary when no data and no params for the Trans2 calls. See MS-CIFS 2.2.4.47.2 for details. Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Sat Jun 16 07:59:19 CEST 2012 on sn-devel-104 --- source3/smbd/trans2.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index a093575c03..3a13cd2b21 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -8870,6 +8870,15 @@ void reply_transs2(struct smb_request *req) show_msg((const char *)req->inbuf); + /* Windows clients expect all replies to + a transact secondary (SMBtranss2 0x33) + to have a command code of transact + (SMBtrans2 0x32). See bug #8989 + and also [MS-CIFS] section 2.2.4.47.2 + for details. + */ + req->cmd = SMBtrans2; + if (req->wct < 8) { reply_nterror(req, NT_STATUS_INVALID_PARAMETER); END_PROFILE(SMBtranss2); -- cgit