From 816c40cb0d6cfa39690e5a9ccca914c731f898a3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 15 Jun 2012 21:10:37 -0700 Subject: Fix 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 Found by Richard Sharpe . The correct command code in a reply to NT Transact Secondary (0xa1) is NT Transact (0xa0). --- source3/smbd/nttrans.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 3721125166..5410fcb219 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -2928,6 +2928,12 @@ void reply_nttranss(struct smb_request *req) show_msg((const char *)req->inbuf); + /* Windows clients expect all replies to + an NT transact secondary (SMBnttranss 0xA1) + to have a command code of NT transact + (SMBnttrans 0xA0). See bug #8989 for details. */ + req->cmd = SMBnttrans; + if (req->wct < 18) { reply_nterror(req, NT_STATUS_INVALID_PARAMETER); END_PROFILE(SMBnttranss); -- cgit