Fix Bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does not send...
authorJeremy Allison <jra@samba.org>
Sat, 16 Jun 2012 04:10:37 +0000 (21:10 -0700)
committerJeremy Allison <jra@samba.org>
Sat, 16 Jun 2012 04:10:37 +0000 (21:10 -0700)
Found by Richard Sharpe <realrichardsharpe@gmail.com>. The correct
command code in a reply to NT Transact Secondary (0xa1) is
NT Transact (0xa0).

source3/smbd/nttrans.c

index 37211251665e7a213dca310a8d434bf70a1fe2a1..5410fcb219fd984b70714610816adf7cf486a58f 100644 (file)
@@ -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);