From 7e2e8391646a2af815b950b1f18a03d7ecccfe6e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 11 Dec 2007 18:57:58 +0000 Subject: * fhandler_disk_file.cc (fhandler_base::fstat_helper): Fix R/O bit handling on filesystems without ACL support. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler_disk_file.cc | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'winsup') diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ca28c9b66e1..81ea10f82fb 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2007-12-11 Corinna Vinschen + + * fhandler_disk_file.cc (fhandler_base::fstat_helper): Fix R/O bit + handling on filesystems without ACL support. + 2007-12-11 Corinna Vinschen * localtime.cc (tzset): Guard by a muto for thread safety. diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 82510c0bff8..91d42378938 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -488,13 +488,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 ()) -- cgit v1.2.1