From 50bd7b0bb6e66425b5b1cb315dacd157a6d30e1c Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 26 Aug 2009 19:37:34 +0000 Subject: [PATCH] * fhandler.cc (fhandler_base::open): Only set R/O attribute if ACLs are not used. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler.cc | 5 +++-- 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 + + * fhandler.cc (fhandler_base::open): Only set R/O attribute if ACLs + are not used. + 2009-08-24 Corinna Vinschen * 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,