summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-08-16 21:27:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:21 -0500
commitf17922d537213fe1d15cebcd78a8df4068801e7f (patch)
treeeac2e66bc2d4099f08fb68fe8190f031d3e72bd8 /source3/smbd
parentcc72b666ed93556a2413055f161e67437024a320 (diff)
downloadsamba-f17922d537213fe1d15cebcd78a8df4068801e7f.tar.gz
samba-f17922d537213fe1d15cebcd78a8df4068801e7f.tar.bz2
samba-f17922d537213fe1d15cebcd78a8df4068801e7f.zip
r1841: Fix for #1606, can't launch dos exe's.
2 related problems - 1). DOS uses chained commands - when we are replying with sendfile we neglect to send the chained header. 2). Win9x and DOS TCP stacks blow up when getting data back from a Linux sendfile - "The engines canna take the strain cap'n". Don't use sendfile for anything less than NT1. Jeremy. (This used to be commit 3cd88f48afa589a189bb728d2d2660d058203d4d)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/reply.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 4125d71b84..74872eeea9 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -1735,7 +1735,7 @@ void send_file_readbraw(connection_struct *conn, files_struct *fsp, SMB_OFF_T st
* reply_readbraw has already checked the length.
*/
- if ((nread > 0) && (lp_write_cache_size(SNUM(conn)) == 0) && lp_use_sendfile(SNUM(conn)) ) {
+ if (chain_size ==0 && (nread > 0) && (lp_write_cache_size(SNUM(conn)) == 0) && lp_use_sendfile(SNUM(conn)) ) {
DATA_BLOB header;
_smb_setlen(outbuf,nread);
@@ -2075,7 +2075,7 @@ int send_file_readX(connection_struct *conn, char *inbuf,char *outbuf,int length
* on a train in Germany :-). JRA.
*/
- if ((CVAL(inbuf,smb_vwv0) == 0xFF) && lp_use_sendfile(SNUM(conn)) &&
+ if (chain_size ==0 && (CVAL(inbuf,smb_vwv0) == 0xFF) && lp_use_sendfile(SNUM(conn)) &&
(lp_write_cache_size(SNUM(conn)) == 0) ) {
SMB_STRUCT_STAT sbuf;
DATA_BLOB header;