Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-08-26 23:37:34 +0400
committerCorinna Vinschen <corinna@vinschen.de>2009-08-26 23:37:34 +0400
commit50bd7b0bb6e66425b5b1cb315dacd157a6d30e1c (patch)
tree622a18f2fc5312b90ca0fd8771dac43c66bc8234
parent1f14755fd2ceafe484fe44b9d9dca7446fb2068e (diff)
* fhandler.cc (fhandler_base::open): Only set R/O attribute if ACLs
are not used.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler.cc5
2 files changed, 8 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 53906bc8f..82a0f338d 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.cc (fhandler_base::open): Only set R/O attribute if ACLs
+ are not used.
+
2009-08-24 Corinna Vinschen <corinna@vinschen.de>
* mount.cc (fs_info::update): Add comment.
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index b8f624e2f..b52d7c2f1 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -553,8 +553,9 @@ fhandler_base::open (int flags, mode_t mode)
{
file_attributes |= FILE_ATTRIBUTE_NORMAL;
- /* If mode has no write bits set, we set the R/O attribute. */
- if (!(mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
+ /* If mode has no write bits set, and ACLs are not used, we set
+ the DOS R/O attribute. */
+ if (!has_acls () && !(mode & (S_IWUSR | S_IWGRP | S_IWOTH)))
file_attributes |= FILE_ATTRIBUTE_READONLY;
/* If the file should actually be created and has ACLs,