summaryrefslogtreecommitdiff
path: root/source3/smbd/process.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-04-09 21:01:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:16 -0500
commita0987247347e473e4802f9267773b0bff68f0187 (patch)
treec24bf29d76b899f516bd27dad835cff607910485 /source3/smbd/process.c
parenta40df6f92d42676a9184fb2c20a11d5662ca5b3a (diff)
downloadsamba-a0987247347e473e4802f9267773b0bff68f0187.tar.gz
samba-a0987247347e473e4802f9267773b0bff68f0187.tar.bz2
samba-a0987247347e473e4802f9267773b0bff68f0187.zip
r22145: Fix bug #4494 - reported by Kevin Jamieson <bugzilla@kevinjamieson.com>.
If returning a mapped UNIX error from sendfile, don't call chain_reply. Jeremy. (This used to be commit 38404c990db1436241c3a774c51196bc058d7576)
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r--source3/smbd/process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 59ad96d880..c5db007525 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1161,8 +1161,8 @@ int chain_reply(char *inbuf,char *outbuf,int size,int bufsize)
char outbuf_saved[smb_wct];
int outsize = smb_len(outbuf) + 4;
- /* maybe its not chained */
- if (smb_com2 == 0xFF) {
+ /* Maybe its not chained, or it's an error packet. */
+ if (smb_com2 == 0xFF || SVAL(outbuf,smb_rcls) != 0) {
SCVAL(outbuf,smb_vwv0,0xFF);
return outsize;
}