From b811398206a5ed43f278ed496da523fd5428ec31 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 11 Sep 2014 18:01:24 +0200 Subject: [PATCH] s3:smbd:open: if we recreated a file that vanished after checking, don't fail the open BUG: https://bugzilla.samba.org/show_bug.cgi?id=10809 Signed-off-by: Michael Adam --- source3/smbd/open.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 6261a449..c1c5468 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2489,7 +2489,10 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, return fsp_open; } - if (file_existed && !check_same_dev_ino(&saved_stat, &smb_fname->st)) { + if (file_existed && + !new_file_created && + !check_same_dev_ino(&saved_stat, &smb_fname->st)) + { /* * The file did exist, but some other (local or NFS) * process either renamed/unlinked and re-created the -- 1.9.1