aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2007-12-11 18:57:44 +0000
committerCorinna Vinschen <corinna@vinschen.de>2007-12-11 18:57:44 +0000
commit5c80ea02302e031225003689df63eb206d248a35 (patch)
tree7ae30522d35bf464eb1f2dedc57c1b9ec9587e09 /winsup
parent22eeaf62bb7b183ed470871e55f0e6fd5f5d10ab (diff)
downloadnewlib-5c80ea02302e031225003689df63eb206d248a35.zip
newlib-5c80ea02302e031225003689df63eb206d248a35.tar.gz
newlib-5c80ea02302e031225003689df63eb206d248a35.tar.bz2
* fhandler_disk_file.cc (fhandler_base::fstat_helper): Fix R/O bit
handling on filesystems without ACL support.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc7
2 files changed, 8 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index dce318d..7c3ddab 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2007-12-11 Corinna Vinschen <corinna@vinschen.de>
+ * fhandler_disk_file.cc (fhandler_base::fstat_helper): Fix R/O bit
+ handling on filesystems without ACL support.
+
+2007-12-11 Corinna Vinschen <corinna@vinschen.de>
+
* localtime.cc (tzset): Guard by a muto for thread safety.
2007-12-11 Dave Korn <dave.korn@artimi.com>
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 81b274f..c68b426 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -553,13 +553,12 @@ fhandler_base::fstat_helper (struct __stat64 *buf,
{
buf->st_mode |= STD_RBITS;
- if (!::has_attribute (dwFileAttributes, FILE_ATTRIBUTE_READONLY)
- && !pc.isdir () && !pc.issymlink ())
+ if (!::has_attribute (dwFileAttributes, FILE_ATTRIBUTE_READONLY))
buf->st_mode |= STD_WBITS;
/* | S_IWGRP | S_IWOTH; we don't give write to group etc */
- if (S_ISDIR (buf->st_mode))
- buf->st_mode |= S_IFDIR | STD_XBITS;
+ if (pc.isdir ())
+ buf->st_mode |= S_IFDIR | STD_WBITS | STD_XBITS;
else if (buf->st_mode & S_IFMT)
/* nothing */;
else if (is_fs_special ())