s3:smbd: fix a race in open code
commit8ae8c63da19459fd4f1166e11406da2c919b7ed0
authorMichael Adam <obnox@samba.org>
Tue, 9 Sep 2014 22:31:25 +0000 (10 00:31 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 10 Sep 2014 17:24:13 +0000 (10 19:24 +0200)
tree73ef9c54cd6c9926f3e2523c9d7c57d610f1ab42
parent551ae16ab3be301ce5402e60f63f736960335d9f
s3:smbd: fix a race in open code

The race is when a file vanishes between
existence check and acl check.

In this case, open_file_ncreate() returns
OBJECT_NAME_NOT_FOUND even if the create
was called with disposition OPEN_IF.
But in this case, the file should be created.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/open.c