summaryrefslogtreecommitdiffstats
path: root/source3/smbd/smb2_create.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-12-14 08:39:26 -0800
committerStefan Metzmacher <metze@samba.org>2012-12-18 14:19:13 +0100
commit2148d86c7a2facd6e128b753aef98722843af3e1 (patch)
tree24b2a848c66d1aaf67454f972cd0e192252e4b7f /source3/smbd/smb2_create.c
parentd8461992dbc6005f02240cf1eae8a56ba4c55148 (diff)
downloadsamba-2148d86c7a2facd6e128b753aef98722843af3e1.tar.gz
samba-2148d86c7a2facd6e128b753aef98722843af3e1.tar.xz
samba-2148d86c7a2facd6e128b753aef98722843af3e1.zip
Fix bug #9196 - defer_open is triggered multiple times on the same request.
get_deferred_open_message_state_smb2() is buggy in that it is checking the wrong things to determine if an open is in the deferred state. It checks if (smb2req->async_te == NULL) which is incorrect, as we're not always async in a deferred open - remove this. It should check instead state->open_was_deferred as this is explicity set to 'true' when an open is going deferred, so add this check. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Dec 18 14:19:13 CET 2012 on sn-devel-104
Diffstat (limited to 'source3/smbd/smb2_create.c')
-rw-r--r--source3/smbd/smb2_create.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index 812d9db1c0..21f25494c7 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -1133,9 +1133,6 @@ bool get_deferred_open_message_state_smb2(struct smbd_smb2_request *smb2req,
if (!smb2req) {
return false;
}
- if (smb2req->async_te == NULL) {
- return false;
- }
req = smb2req->subreq;
if (!req) {
return false;
@@ -1144,6 +1141,9 @@ bool get_deferred_open_message_state_smb2(struct smbd_smb2_request *smb2req,
if (!state) {
return false;
}
+ if (!state->open_was_deferred) {
+ return false;
+ }
if (p_request_time) {
*p_request_time = state->request_time;
}