summaryrefslogtreecommitdiff
path: root/source4/smb_server/request.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smb_server/request.c')
-rw-r--r--source4/smb_server/request.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/source4/smb_server/request.c b/source4/smb_server/request.c
index 964f4a2d70..5c1d14a9d0 100644
--- a/source4/smb_server/request.c
+++ b/source4/smb_server/request.c
@@ -256,7 +256,7 @@ void req_grow_data(struct request_context *req, unsigned new_size)
note that this only looks at req->out.buffer and req->out.size, allowing manually
constructed packets to be sent
*/
-void req_send_reply(struct request_context *req)
+void req_send_reply_nosign(struct request_context *req)
{
if (req->out.size > NBT_HDR_SIZE) {
_smb_setlen(req->out.buffer, req->out.size - NBT_HDR_SIZE);
@@ -269,6 +269,23 @@ void req_send_reply(struct request_context *req)
req_destroy(req);
}
+/*
+ possibly sign a message then send a reply and destroy the request buffer
+
+ note that this only looks at req->out.buffer and req->out.size, allowing manually
+ constructed packets to be sent
+*/
+void req_send_reply(struct request_context *req)
+{
+ if (req->out.size > NBT_HDR_SIZE) {
+ _smb_setlen(req->out.buffer, req->out.size - NBT_HDR_SIZE);
+ }
+
+ req_sign_packet(req);
+
+ req_send_reply_nosign(req);
+}
+
/*