Fix Bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does not send...
[samba.git] / source3 / smbd / nttrans.c
index 6fbbed9bfe04e923cf321a89713435ece7952324..2ca14f477d208c7bea6851a8ee555627cd18667b 100644 (file)
@@ -133,11 +133,6 @@ void send_nt_replies(connection_struct *conn,
                             total_sent_thistime + alignment_offset
                             + data_alignment_offset);
 
-               /*
-                * We might have had SMBnttranss in req->inbuf, fix that.
-                */
-               SCVAL(req->outbuf, smb_com, SMBnttrans);
-
                /*
                 * Set total params and data to be sent.
                 */
@@ -3068,6 +3063,12 @@ void reply_nttranss(struct smb_request *req)
 
        show_msg((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);