Fix the SMB2 showstopper, found by an extended torture test from Volker.
authorJeremy Allison <jra@samba.org>
Mon, 16 May 2011 19:20:14 +0000 (12:20 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 16 May 2011 20:38:20 +0000 (22:38 +0200)
commit8cf14c21b3bc55454728bf48b23f696e15c92aea
tree5a235ea1f083432d2c816d38784c7fcb9c9c4a42
parentfe21bdc43c0aeacfc8592998e6a90f6f83c939e0
Fix the SMB2 showstopper, found by an extended torture test from Volker.

In the oplock refactoring, the algorithm underwent an unnoticed change.
In 3.5.x stat_opens were silently (i.e. no explicit code had comments
explaining this) ignored when looking for oplock breaks and share mode
violations. After the refactoring, the function find_oplock_types()
no longer ignored stat_open entries in the share mode table when looking
for batch and exclusive oplocks. This patch adds two changes to find_oplock_types()
to ignore the case where the incoming open request is a stat open being
tested against existing opens, and also when the incoming open request
is a non-stat open being tested against existing stat opens. Neither
of these cause an oplock break or share mode violation. Thanks a *lot*
to Volker, who persevered in reproducing this problem.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon May 16 22:38:20 CEST 2011 on sn-devel-104
source3/smbd/open.c