diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/vfs.h | 2 | ||||
-rw-r--r-- | source3/smbd/process.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 723eb6c826..e6a9ef4541 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -399,6 +399,8 @@ struct smb_request { * Request list for chained requests, we're part of it. */ struct smb_request **chain; + + struct timeval request_time; }; /* diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 5e26826d6a..9e1abb268c 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -517,12 +517,16 @@ static bool init_smb_request(struct smb_request *req, uint32_t seqnum) { size_t req_size = smb_len(inbuf) + 4; + /* Ensure we have at least smb_size bytes. */ if (req_size < smb_size) { DEBUG(0,("init_smb_request: invalid request size %u\n", (unsigned int)req_size )); return false; } + + req->request_time = timeval_current(); + req->cmd = CVAL(inbuf, smb_com); req->flags2 = SVAL(inbuf, smb_flg2); req->smbpid = SVAL(inbuf, smb_pid); |