summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-12-30 21:19:08 -0800
committerJeremy Allison <jra@samba.org>2011-12-31 08:05:35 +0100
commite39df67669f61056692736db9c8dc16fbf2c3624 (patch)
treefc923636d9ce8f5f6c82bae6355429c8af922c34
parent5e6263960aaf1a5f9993cb7bb5646d36ff92b9cc (diff)
downloadsamba-e39df67669f61056692736db9c8dc16fbf2c3624.tar.gz
samba-e39df67669f61056692736db9c8dc16fbf2c3624.tar.bz2
samba-e39df67669f61056692736db9c8dc16fbf2c3624.zip
Final part of fix for bug #8679 - recvfile code path using splice() on Linux leaves data in the pipe on short write.
The code to set a DOS error on short writeX return is amazingly legacy code, and also breaks the reply as fixup_chain_error_packet() enforces a 2-byte wct on any reply where smb_rcls != 0. Found in testing by Andrew Bartlett. Thanks Andrew ! Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Dec 31 08:05:35 CET 2011 on sn-devel-104
-rw-r--r--source3/smbd/reply.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 257ce7001a..4954098de7 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -4671,11 +4671,6 @@ void reply_write_and_X(struct smb_request *req)
SSVAL(req->outbuf,smb_vwv2,nwritten);
SSVAL(req->outbuf,smb_vwv4,nwritten>>16);
- if (nwritten < (ssize_t)numtowrite) {
- SCVAL(req->outbuf,smb_rcls,ERRHRD);
- SSVAL(req->outbuf,smb_err,ERRdiskfull);
- }
-
DEBUG(3,("writeX fnum=%d num=%d wrote=%d\n",
fsp->fnum, (int)numtowrite, (int)nwritten));