Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2000-02-21 03:31:55 +0300
committerCorinna Vinschen <corinna@vinschen.de>2000-02-21 03:31:55 +0300
commit486e3de2010caeedde2a8556850d0603d26c71f0 (patch)
tree91c4b16c79b011fefebdfe90507cb5d14ebc3323 /winsup/cygwin
parent4859a550420424f6be3f479c906f056bf9684330 (diff)
*** empty log message ***
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler.cc4
2 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 70651d065..63a3856f5 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+Sun Feb 18 21:31:00 2000 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.cc (fhandler_disk_file::fstat): Modify get_file_attribute
+ return value if FILE_ATTRIBUTE_READONLY is set.
+
Mon Feb 7 16:50:44 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: cygrun needs libshell32.a.
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 58521d48b..c0f0ed74d 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -950,6 +950,10 @@ fhandler_disk_file::fstat (struct stat *buf)
buf->st_mode |= S_IFDIR;
if (! get_file_attribute (has_acls (), get_win32_name (), &buf->st_mode))
{
+ /* If read-only attribute is set, modify ntsec return value */
+ if (local.dwFileAttributes & FILE_ATTRIBUTE_READONLY)
+ buf->st_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH);
+
buf->st_mode &= ~S_IFMT;
if (get_symlink_p ())
buf->st_mode |= S_IFLNK;