summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/blocking.c2
-rw-r--r--source3/smbd/notify.c1
-rw-r--r--source3/smbd/process.c5
3 files changed, 5 insertions, 3 deletions
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index 78a63dcbb2..f4e2b69d6b 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -263,6 +263,7 @@ static void reply_lockingX_success(blocking_lock_record *blr)
}
init_smb_request(req, (uint8 *)blr->inbuf, 0, blr->encrypted);
+ req->inbuf = (uint8_t *)(blr->inbuf);
reply_outbuf(req, 2, 0);
/*
@@ -543,6 +544,7 @@ static bool process_trans2(blocking_lock_record *blr)
}
init_smb_request(req, (uint8 *)blr->inbuf, 0, blr->encrypted);
+ req->inbuf = (uint8_t *)(blr->inbuf);
SCVAL(req->inbuf, smb_com, SMBtrans2);
SSVAL(params,0,0);
diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c
index 139dfe7d5b..b2d0f20f89 100644
--- a/source3/smbd/notify.c
+++ b/source3/smbd/notify.c
@@ -198,6 +198,7 @@ void change_notify_reply(connection_struct *conn,
SCVAL(tmp_request, smb_wct, 0);
init_smb_request(req, tmp_request,0, conn->encrypted_tid);
+ req->inbuf = tmp_request;
send_nt_replies(conn, req, NT_STATUS_OK, prs_data_p(&ps),
prs_offset(&ps), NULL, 0);
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 1dcfb4b122..958e8634e9 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -400,7 +400,6 @@ void init_smb_request(struct smb_request *req,
(unsigned int)req_size));
exit_server_cleanly("Invalid SMB request");
}
- req->inbuf = inbuf;
req->outbuf = NULL;
}
@@ -1497,6 +1496,7 @@ static void construct_reply(char *inbuf, int size, size_t unread_bytes, bool enc
smb_panic("could not allocate smb_request");
}
init_smb_request(req, (uint8 *)inbuf, unread_bytes, encrypted);
+ req->inbuf = (uint8_t *)talloc_move(req, &inbuf);
conn = switch_message(req->cmd, req, size);
@@ -1723,6 +1723,7 @@ void chain_reply(struct smb_request *req)
smb_panic("could not allocate smb_request");
}
init_smb_request(req2, (uint8 *)inbuf2,0, req->encrypted);
+ req2->inbuf = (uint8_t *)inbuf2;
req2->chain_fsp = req->chain_fsp;
/* process the request */
@@ -1931,8 +1932,6 @@ void smbd_process(void)
process_smb(inbuf, inbuf_len, unread_bytes, encrypted);
- TALLOC_FREE(inbuf);
-
num_smbs++;
/* The timeout_processing function isn't run nearly