From: Stefan Metzmacher Date: Fri, 5 Jun 2020 18:14:10 +0000 (+0200) Subject: s3:smbd: add smbd_smb2_send_queue.sendfile_body_size X-Git-Tag: samba-4.13.0rc1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37c52c2d49830940397a164864044dbd1f5d6c6a;p=thirdparty%2Fsamba.git s3:smbd: add smbd_smb2_send_queue.sendfile_body_size The following patches require the size of the full sendfile() pdu. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11897 Signed-off-by: Stefan Metzmacher Reviewed-by: Günther Deschner --- diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index e749d5e954e..ec728b7dcf3 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -682,6 +682,7 @@ struct smbd_smb2_send_queue { struct smbd_smb2_send_queue *prev, *next; DATA_BLOB *sendfile_header; + uint32_t sendfile_body_size; NTSTATUS *sendfile_status; struct iovec *vector; int count; diff --git a/source3/smbd/smb2_read.c b/source3/smbd/smb2_read.c index 3441ac27c0c..cd590a52c95 100644 --- a/source3/smbd/smb2_read.c +++ b/source3/smbd/smb2_read.c @@ -651,6 +651,7 @@ static NTSTATUS smbd_smb2_read_recv(struct tevent_req *req, talloc_set_destructor(state, smb2_smb2_read_state_deny_destructor); tevent_req_received(req); state->smb2req->queue_entry.sendfile_header = &state->out_headers; + state->smb2req->queue_entry.sendfile_body_size = state->in_length; talloc_set_destructor(state, smb2_sendfile_send_data); } else { tevent_req_received(req);