diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-03-19 12:04:32 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-03-22 17:15:11 +0100 |
commit | 1e7086e5ce0924687d657de583adb63a9f0c1bfb (patch) | |
tree | 4a7caaa47d4eadf6c948c1d2e2c51fc625aa9c8b /source3/smbd | |
parent | c1653e3b0e536e835faf82a5aadadaec1cd38d1a (diff) | |
download | samba-1e7086e5ce0924687d657de583adb63a9f0c1bfb.tar.gz samba-1e7086e5ce0924687d657de583adb63a9f0c1bfb.tar.bz2 samba-1e7086e5ce0924687d657de583adb63a9f0c1bfb.zip |
s3:smbd: let reply_readbraw_error use the locked socket
metze
Diffstat (limited to 'source3/smbd')
-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"); + } } /**************************************************************************** |