diff options
-rw-r--r-- | source3/smbd/reply.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 7d0fa7728a..175c0156e8 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -2895,11 +2895,22 @@ static void sendfile_short_send(files_struct *fsp, static void reply_readbraw_error(void) { + bool ok; char header[4]; + SIVAL(header,0,0); + + ok = smbd_lock_socket(smbd_server_conn); + if (!ok) { + exit_server_cleanly("failed to lock socket"); + } if (write_data(smbd_server_fd(),header,4) != 4) { fail_readraw(); } + ok = smbd_unlock_socket(smbd_server_conn); + if (!ok) { + exit_server_cleanly("failed to unlock socket"); + } } /**************************************************************************** |