Fix bug #9196 - defer_open is triggered multiple times on the same request.
commita3f5202cfeb48b64ffe9958b35c477c9d4f68788
authorJeremy Allison <jra@samba.org>
Fri, 14 Dec 2012 16:56:52 +0000 (14 08:56 -0800)
committerKarolin Seeger <kseeger@samba.org>
Thu, 17 Jan 2013 08:09:16 +0000 (17 09:09 +0100)
tree718b9768b92aa1a4bc7f10425099c5f75f50d1c6
parent2b8c53d70129a7d364de00d220a547ec7bc900b2
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)
source3/smbd/smb2_create.c