summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-04-11 16:54:17 +0200
committerStefan Metzmacher <metze@samba.org>2012-06-15 09:17:32 +0200
commit8cca7b09ad349e8d549eb326cdd2362cf3843773 (patch)
treee6d41d5c385c1b50fc3c4106d0bf5503f46ab480 /source3
parentd8b3687fcbb2ac37bf93b23301da4bf4d79301f6 (diff)
downloadsamba-8cca7b09ad349e8d549eb326cdd2362cf3843773.tar.gz
samba-8cca7b09ad349e8d549eb326cdd2362cf3843773.tar.bz2
samba-8cca7b09ad349e8d549eb326cdd2362cf3843773.zip
s3:smb2_server: remember the request_time on an incoming request
metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jun 15 09:17:33 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/globals.h2
-rw-r--r--source3/smbd/smb2_glue.c1
-rw-r--r--source3/smbd/smb2_server.c2
3 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index a0d5be0226..8113b8ebbb 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -379,6 +379,8 @@ struct smbd_smb2_request {
bool cancelled;
bool compound_related;
+ struct timeval request_time;
+
/* fake smb1 request. */
struct smb_request *smb1req;
struct files_struct *compat_chain_fsp;
diff --git a/source3/smbd/smb2_glue.c b/source3/smbd/smb2_glue.c
index 360a73a40b..a71679fdf2 100644
--- a/source3/smbd/smb2_glue.c
+++ b/source3/smbd/smb2_glue.c
@@ -36,6 +36,7 @@ struct smb_request *smbd_smb2_fake_smb_request(struct smbd_smb2_request *req)
return NULL;
}
+ smbreq->request_time = req->request_time;
smbreq->vuid = req->session->compat_vuser->vuid;
smbreq->tid = req->tcon->compat_conn->cnum;
smbreq->conn = req->tcon->compat_conn;
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 3cee931150..5d30aa4890 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -571,6 +571,8 @@ static NTSTATUS smbd_smb2_request_setup_out(struct smbd_smb2_request *req)
int count;
int idx;
+ req->request_time = timeval_current();
+
count = req->in.vector_count;
vector = talloc_zero_array(req, struct iovec, count);
if (vector == NULL) {