Fix bug #9196 - defer_open is triggered multiple times on the same request.
authorJeremy Allison <jra@samba.org>
Fri, 14 Dec 2012 16:39:26 +0000 (08:39 -0800)
committerKarolin Seeger <kseeger@samba.org>
Wed, 2 Jan 2013 11:18:39 +0000 (12:18 +0100)
commit04388adfe82bd0fa52c30074c501b2db87ee3c65
tree5de77161a654b32b70dd6cf8aebed777e69d2486
parent9b4bd4322febc429e4daf286000bd9a51cbc34ec
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
(cherry picked from commit 2148d86c7a2facd6e128b753aef98722843af3e1)

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Wed Jan  2 12:18:40 CET 2013 on sn-devel-104
source3/smbd/smb2_create.c