s3:smbd: push nttrans and trans2 responses with no data to the client
authorStefan Metzmacher <metze@samba.org>
Mon, 29 Jun 2009 13:38:48 +0000 (15:38 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 2 Jul 2009 07:10:59 +0000 (09:10 +0200)
For sync replies it's not a problem, as construct_reply() will send
the response, but for async replies we would not send the reply to the client.
Currently the notify code works arround this manually, so I assume
we didn't have a bug here. But the next commits will simplify
the notify code.

metze

source3/smbd/nttrans.c
source3/smbd/trans2.c

index a08414d0b051c84eeac10173eb27358fa4a38832..368a1a8f987d96befa26315134046396f8b15253 100644 (file)
@@ -74,6 +74,14 @@ void send_nt_replies(connection_struct *conn,
                                         __LINE__,__FILE__);
                }
                show_msg((char *)req->outbuf);
+               if (!srv_send_smb(smbd_server_fd(),
+                               (char *)req->outbuf,
+                               true, req->seqnum+1,
+                               IS_CONN_ENCRYPTED(conn),
+                               &req->pcd)) {
+                       exit_server_cleanly("send_nt_replies: srv_send_smb failed.");
+               }
+               TALLOC_FREE(req->outbuf);
                return;
        }
 
index 28b07527cc42ec80286550601321130b7774e99d..ffa3de5af6fb038b2a1ac430dbdaf180f508651d 100644 (file)
@@ -712,6 +712,14 @@ void send_trans2_replies(connection_struct *conn,
        if(params_to_send == 0 && data_to_send == 0) {
                reply_outbuf(req, 10, 0);
                show_msg((char *)req->outbuf);
+               if (!srv_send_smb(smbd_server_fd(),
+                               (char *)req->outbuf,
+                               true, req->seqnum+1,
+                               IS_CONN_ENCRYPTED(conn),
+                               &req->pcd)) {
+                       exit_server_cleanly("send_trans2_replies: srv_send_smb failed.");
+               }
+               TALLOC_FREE(req->outbuf);
                return;
        }