summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-03-19 12:04:32 +0100
committerStefan Metzmacher <metze@samba.org>2010-03-22 17:15:11 +0100
commit1e7086e5ce0924687d657de583adb63a9f0c1bfb (patch)
tree4a7caaa47d4eadf6c948c1d2e2c51fc625aa9c8b /source3/smbd
parentc1653e3b0e536e835faf82a5aadadaec1cd38d1a (diff)
downloadsamba-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.c11
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");
+ }
}
/****************************************************************************