s3: smbd - open logic fix.
authorJeremy Allison <jra@samba.org>
Thu, 11 Sep 2014 17:03:01 +0000 (10:03 -0700)
committerKarolin Seeger <kseeger@samba.org>
Sat, 27 Sep 2014 18:58:13 +0000 (20:58 +0200)
commitbcc891287b9bde839af8514062360afc0bbcca81
tree507a54548ab6adc8a98ad8db4af9e513d38edc4c
parentad70de6a07ee9e66727df55a6506e8911cf27a0c
s3: smbd - open logic fix.

As we atomically create using O_CREAT|O_EXCL,
then if new_file_created is true, then
file_existed *MUST* have been false (even
if the file was previously detected as being
there.

We use the variable file_existed again in logic
below this statement, so we must set file_existed = false,
if new_file_created returns are true from open_file().

Based on a fix from Michael Adam.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10809

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Sep 11 22:29:22 CEST 2014 on sn-devel-104

(cherry picked from commit 518247bf80372eb003cb67036b9d9e7fe8aac303)
source3/smbd/open.c