]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Fix race where wrong action (created or opened) could be returned.
authorJeremy Allison <jra@samba.org>
Thu, 5 Jul 2001 23:37:09 +0000 (23:37 +0000)
committerJeremy Allison <jra@samba.org>
Thu, 5 Jul 2001 23:37:09 +0000 (23:37 +0000)
Jeremy.

source/smbd/open.c

index 858a26191f97cfa949113595fd124dfa78cd42eb..f67490b61d39afa8e17b404ca7729ec592f1103c 100644 (file)
@@ -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*.....
                 */