diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2009-08-26 19:37:34 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2009-08-26 19:37:34 +0000 |
commit | 50bd7b0bb6e66425b5b1cb315dacd157a6d30e1c (patch) | |
tree | 622a18f2fc5312b90ca0fd8771dac43c66bc8234 /winsup/cygwin/fhandler.cc | |
parent | 1f14755fd2ceafe484fe44b9d9dca7446fb2068e (diff) | |
download | cygnal-50bd7b0bb6e66425b5b1cb315dacd157a6d30e1c.tar.gz cygnal-50bd7b0bb6e66425b5b1cb315dacd157a6d30e1c.tar.bz2 cygnal-50bd7b0bb6e66425b5b1cb315dacd157a6d30e1c.zip |
* fhandler.cc (fhandler_base::open): Only set R/O attribute if ACLs
are not used.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r-- | winsup/cygwin/fhandler.cc | 5 |
1 files changed, 3 insertions, 2 deletions
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, |