Samba 3.5.x (and probably everything else) does not send correct responses to NT Transact Secondary when no data and no params

Richard Sharpe realrichardsharpe at gmail.com
Thu Jun 7 17:01:54 MDT 2012


Hi folks,

The following change is required because the default formatting of
reply_outbuf sets up an NT TRANS Secondary response, which the spec
says do not exist.

--- smbd/nttrans.c.orig 2012-06-07 15:59:33.170255874 -0700
+++ smbd/nttrans.c      2012-06-07 15:53:05.719790218 -0700
@@ -67,6 +67,9 @@ void send_nt_replies(connection_struct *

        if(params_to_send == 0 && data_to_send == 0) {
                reply_outbuf(req, 18, 0);
+               /* [MS_CIFS].pdf 2.2.4.62.2 says NT TRANS used for response
+                  even for secondaries */
+               SCVAL(req->outbuf, smb_com, SMBnttrans);
                if (NT_STATUS_V(nt_error)) {
                        error_packet_set((char *)req->outbuf,
                                         0, 0, nt_error,


-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list