r9584: Fix a race condition in Samba 3. If two files are opened simultaneously with
authorVolker Lendecke <vlendec@samba.org>
Wed, 24 Aug 2005 13:15:01 +0000 (13:15 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:34:32 +0000 (13:34 -0500)
commit11f4803d002bf5a4bba24103d6c472ea638e196e
treec3516a362d4e07aa6c155483cab7009bb2d6d78e
parentca71549d5af608a280645f69016749ae9da89747
r9584: Fix a race condition in Samba 3. If two files are opened simultaneously with
NTCREATEX_DISP_CREATE (create if not exists, else fail) they might end up with
two or more times NT_STATUS_OK as EEXIST is not correctly handled.

Jeremy, please look closely at this. You can easily verify this by adding a
smb_msleep(100) to the top of open_file_ntcreate and run the new samba4
torture test. It does also happen without the msleep, but not as reliably.

Thanks,

Volker
(This used to be commit c803d4c9a588e39a90ddfe900be9b9de1a861f82)
source4/torture/raw/open.c
source4/torture/torture.c