From: Jeremy Allison Date: Thu, 5 Jul 2001 23:37:09 +0000 (+0000) Subject: Fix race where wrong action (created or opened) could be returned. X-Git-Tag: samba-2.2.5pre1~1779^2~86 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=af5b649b017f703a14a69f77a9067efb9c6a8269;p=thirdparty%2Fsamba.git Fix race where wrong action (created or opened) could be returned. Jeremy. --- 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*..... */