s3:smb2_server: check for compound based on SMBD_SMB2_NUM_IOV_PER_REQ
authorStefan Metzmacher <metze@samba.org>
Tue, 7 Aug 2012 10:56:23 +0000 (12:56 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 7 Aug 2012 16:32:46 +0000 (18:32 +0200)
metze

source3/smbd/smb2_server.c

index acc998bfd0a37ce16d02d1f153ccd57ef6023e6f..9766d48f725c4de33a5284aa5d9d537a6fc09dbb 100644 (file)
@@ -2038,7 +2038,7 @@ static NTSTATUS smbd_smb2_request_reply(struct smbd_smb2_request *req)
        }
 
        /* I am a sick, sick man... :-). Sendfile hack ... JRA. */
-       if (req->out.vector_count == 4 &&
+       if (req->out.vector_count < (2*SMBD_SMB2_NUM_IOV_PER_REQ) &&
            outdyn->iov_base == NULL && outdyn->iov_len != 0) {
                /* Dynamic part is NULL. Chop it off,
                   We're going to send it via sendfile. */