]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smb2_read: use SMBD_SMB2_NUM_IOV_PER_REQ when checking for sendfile() support
authorStefan Metzmacher <metze@samba.org>
Wed, 8 Aug 2012 04:17:33 +0000 (06:17 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 8 Aug 2012 10:52:50 +0000 (12:52 +0200)
metze

source3/smbd/smb2_read.c

index 1d6b8588c547d6f36668e25f95f757d0500a2c0d..150bdb8cf191806d804e44e26743af4a89d35983 100644 (file)
@@ -276,7 +276,7 @@ static NTSTATUS schedule_smb2_sendfile_read(struct smbd_smb2_request *smb2req,
 
        if (!lp__use_sendfile(SNUM(fsp->conn)) ||
            smb2req->do_signing ||
-           smb2req->in.vector_count != 4 ||
+           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)) ||