diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-04-11 16:54:17 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-06-15 07:18:00 +0200 |
commit | d8b3687fcbb2ac37bf93b23301da4bf4d79301f6 (patch) | |
tree | 66e9dbc06356ef64869f95553458f10dbf7cafa9 /source3 | |
parent | 59733d911bf9010c7356641d171667a09fc32afb (diff) | |
download | samba-d8b3687fcbb2ac37bf93b23301da4bf4d79301f6.tar.gz samba-d8b3687fcbb2ac37bf93b23301da4bf4d79301f6.tar.bz2 samba-d8b3687fcbb2ac37bf93b23301da4bf4d79301f6.zip |
s3:smbd: remember the request_time on an incoming request
metze
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); |