From 50bd7b0bb6e66425b5b1cb315dacd157a6d30e1c Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 26 Aug 2009 19:37:34 +0000 Subject: * fhandler.cc (fhandler_base::open): Only set R/O attribute if ACLs are not used. --- winsup/cygwin/fhandler.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/fhandler.cc') 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, -- cgit v1.2.3