summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-07-05 23:37:09 +0000
committerJeremy Allison <jra@samba.org>2001-07-05 23:37:09 +0000
commitaa91def29f54a466c7c7efbc8cf442b7a9759afa (patch)
tree4fca0ee1e9b181e5618edc746184632c17dab4e9
parent3a40f80a94cba569c1a1f19ba36165069ba7e83a (diff)
downloadsamba-aa91def29f54a466c7c7efbc8cf442b7a9759afa.tar.gz
samba-aa91def29f54a466c7c7efbc8cf442b7a9759afa.tar.bz2
samba-aa91def29f54a466c7c7efbc8cf442b7a9759afa.zip
Fix race where wrong action (created or opened) could be returned.
Jeremy. (This used to be commit af5b649b017f703a14a69f77a9067efb9c6a8269)
-rw-r--r--source3/smbd/open.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 858a26191f..f67490b61d 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -771,6 +771,14 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n",
}
/*
+ * 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*.....
*/
}