From af5b649b017f703a14a69f77a9067efb9c6a8269 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 5 Jul 2001 23:37:09 +0000 Subject: [PATCH] Fix race where wrong action (created or opened) could be returned. Jeremy. --- source/smbd/open.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/smbd/open.c b/source/smbd/open.c index 858a26191f9..f67490b61d3 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -770,6 +770,14 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n", return NULL; } + /* + * If there are any share modes set then the file *did* + * exist. Ensure we return the correct value for action. + */ + + if (num_share_modes > 0) + file_existed = True; + /* * We exit this block with the share entry *locked*..... */