s3:smb2_read: fix SMBD_SMB2_NUM_IOV_PER_REQ check for sendfile() support (bug #9341)
authorStefan Metzmacher <metze@samba.org>
Tue, 30 Oct 2012 10:08:19 +0000 (11:08 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 30 Oct 2012 15:49:26 +0000 (16:49 +0100)
Reported-by: Sebastien LAVEZE <sebastien.laveze@mindspeed.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Tested-by: Sebastien LAVEZE <sebastien.laveze@mindspeed.com>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Oct 30 16:49:26 CET 2012 on sn-devel-104

source3/smbd/smb2_read.c

index 2890f8674531cc5b3c294c78fbd3299ca194bd5f..41adb03408393ececb6680e1a833734b94c57c5e 100644 (file)
@@ -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)) ||