From: Stefan Metzmacher Date: Tue, 30 Oct 2012 10:08:19 +0000 (+0100) Subject: s3:smb2_read: fix SMBD_SMB2_NUM_IOV_PER_REQ check for sendfile() support (bug #9341) X-Git-Tag: ldb-1.1.14~103 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d8fc4cd25e40164e23c0375b073cb42723892146;p=thirdparty%2Fsamba.git s3:smb2_read: fix SMBD_SMB2_NUM_IOV_PER_REQ check for sendfile() support (bug #9341) Reported-by: Sebastien LAVEZE Signed-off-by: Stefan Metzmacher Reviewed-by: Michael Adam Tested-by: Sebastien LAVEZE Autobuild-User(master): Michael Adam Autobuild-Date(master): Tue Oct 30 16:49:26 CET 2012 on sn-devel-104 --- diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c index 2890f867453..41adb034083 100644 --- a/source3/smbd/smb2_read.c +++ b/source3/smbd/smb2_read.c @@ -277,7 +277,7 @@ static NTSTATUS schedule_smb2_sendfile_read(struct smbd_smb2_request *smb2req, if (!lp__use_sendfile(SNUM(fsp->conn)) || smb2req->do_signing || smb2req->do_encryption || - smb2req->in.vector_count < (2*SMBD_SMB2_NUM_IOV_PER_REQ) || + smb2req->in.vector_count >= (2*SMBD_SMB2_NUM_IOV_PER_REQ) || (fsp->base_fsp != NULL) || (fsp->wcp != NULL) || (!S_ISREG(fsp->fsp_name->st.st_ex_mode)) ||