summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-12-14 08:56:52 -0800
committerKarolin Seeger <kseeger@samba.org>2013-01-17 09:09:16 +0100
commita3f5202cfeb48b64ffe9958b35c477c9d4f68788 (patch)
tree718b9768b92aa1a4bc7f10425099c5f75f50d1c6
parent2b8c53d70129a7d364de00d220a547ec7bc900b2 (diff)
downloadsamba-a3f5202cfeb48b64ffe9958b35c477c9d4f68788.tar.gz
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 == 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> (cherry picked from commit a8658bcb67927282288af5a579e3e66d3eaaac7b)
-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 5a9044d8d74..5b81099928f 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -893,9 +893,6 @@ bool get_deferred_open_message_state_smb2(struct smbd_smb2_request *smb2req,
if (!smb2req) {
return false;
}
- if (!smb2req->async) {
- return false;
- }
req = smb2req->subreq;
if (!req) {
return false;
@@ -904,6 +901,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;
}