From: Jeremy Allison Date: Tue, 5 Apr 2022 01:45:44 +0000 (-0700) Subject: s3: smbd: Rename create_outbuf() -> create_smb1_outbuf() X-Git-Tag: tevent-0.12.0~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97fd5e56c02b83bf8e717a862cbf17cd0ea806d4;p=thirdparty%2Fsamba.git s3: smbd: Rename create_outbuf() -> create_smb1_outbuf() Signed-off-by: Jeremy Allison Reviewed-by: David Mulder --- diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 6096b198d4d..02736e56c48 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -883,7 +883,7 @@ bool push_deferred_open_message_smb(struct smb_request *req, struct timeval timeout, struct file_id id, struct deferred_open_record *open_rec); -bool create_outbuf(TALLOC_CTX *mem_ctx, struct smb_request *req, +bool create_smb1_outbuf(TALLOC_CTX *mem_ctx, struct smb_request *req, const uint8_t *inbuf, char **outbuf, uint8_t num_words, uint32_t num_bytes); void construct_smb1_reply_common_req(struct smb_request *req, char *outbuf); diff --git a/source3/smbd/smb1_process.c b/source3/smbd/smb1_process.c index c8957ef6b92..fcb5bcd1efc 100644 --- a/source3/smbd/smb1_process.c +++ b/source3/smbd/smb1_process.c @@ -2374,9 +2374,9 @@ static bool smbd_echo_reply(struct smbd_echo_state *state, return false; } - if (!create_outbuf(talloc_tos(), &req, req.inbuf, &outbuf, + if (!create_smb1_outbuf(talloc_tos(), &req, req.inbuf, &outbuf, 1, req.buflen)) { - DEBUG(10, ("create_outbuf failed\n")); + DEBUG(10, ("create_smb1_outbuf failed\n")); return false; } req.outbuf = (uint8_t *)outbuf; diff --git a/source3/smbd/smb2_process.c b/source3/smbd/smb2_process.c index 0b050a21aaa..42ac04b2d79 100644 --- a/source3/smbd/smb2_process.c +++ b/source3/smbd/smb2_process.c @@ -517,7 +517,7 @@ void construct_smb1_reply_common_req(struct smb_request *req, char *outbuf) allocate and initialize a reply packet ********************************************************************/ -bool create_outbuf(TALLOC_CTX *mem_ctx, struct smb_request *req, +bool create_smb1_outbuf(TALLOC_CTX *mem_ctx, struct smb_request *req, const uint8_t *inbuf, char **outbuf, uint8_t num_words, uint32_t num_bytes) { @@ -561,7 +561,7 @@ bool create_outbuf(TALLOC_CTX *mem_ctx, struct smb_request *req, void reply_outbuf(struct smb_request *req, uint8_t num_words, uint32_t num_bytes) { char *outbuf; - if (!create_outbuf(req, req, req->inbuf, &outbuf, num_words, + if (!create_smb1_outbuf(req, req, req->inbuf, &outbuf, num_words, num_bytes)) { smb_panic("could not allocate output buffer\n"); }