summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-03-28 17:31:06 -0700
committerJeremy Allison <jra@samba.org>2008-03-28 17:31:06 -0700
commite00bfc509219cce65168f9ef4532eeff09e6f5fb (patch)
tree45ef238a21773afd8837f73cba3ef9614ba135f7 /source3/smbd/reply.c
parente191b0edd534d13e9bdbe62a56d41a240f33f001 (diff)
downloadsamba-e00bfc509219cce65168f9ef4532eeff09e6f5fb.tar.gz
samba-e00bfc509219cce65168f9ef4532eeff09e6f5fb.tar.bz2
samba-e00bfc509219cce65168f9ef4532eeff09e6f5fb.zip
Only allow sendfile on non-stream fsp's. Should fix make test for streams
as sendfile isn't implemented in the streams vfs modules yet. Jeremy. (This used to be commit eef53e9603d4f3d892ffe00b061def5d717ca481)
Diffstat (limited to 'source3/smbd/reply.c')
-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 bababfecac..eb8e5ff915 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -2656,7 +2656,7 @@ void send_file_readbraw(connection_struct *conn,
* reply_readbraw has already checked the length.
*/
- if ( (chain_size == 0) && (nread > 0) &&
+ if ( (chain_size == 0) && (nread > 0) && (fsp->base_fsp == NULL)
(fsp->wcp == NULL) && lp_use_sendfile(SNUM(conn)) ) {
char header[4];
DATA_BLOB header_blob;
@@ -3131,7 +3131,7 @@ static void send_file_readX(connection_struct *conn, struct smb_request *req,
*/
if ((chain_size == 0) && (CVAL(req->inbuf,smb_vwv0) == 0xFF) &&
- !is_encrypted_packet(req->inbuf) &&
+ !is_encrypted_packet(req->inbuf) && (fsp->base_fsp == NULL) &&
lp_use_sendfile(SNUM(conn)) && (fsp->wcp == NULL) ) {
uint8 headerbuf[smb_size + 12 * 2];
DATA_BLOB header;