summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2003-05-27 07:44:26 +0000
committerCorinna Vinschen <corinna@vinschen.de>2003-05-27 07:44:26 +0000
commit2311f6b0e4d977492d54f6f3d3aa781fc56495ac (patch)
tree30be4f046ed1cf248956fb6b433d4606c26e8465
parent3010b05f3712e67fb7e8218a7381e26013656b74 (diff)
downloadcygnal-2311f6b0e4d977492d54f6f3d3aa781fc56495ac.tar.gz
cygnal-2311f6b0e4d977492d54f6f3d3aa781fc56495ac.tar.bz2
cygnal-2311f6b0e4d977492d54f6f3d3aa781fc56495ac.zip
* fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Filter
permissions throug umask on FAT or if ntsec is off.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc3
2 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 76f1fc358..47523dce5 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2003-05-27 Bill C. Riemers <cygwin@docbill.net>
+
+ * fhandler_disk_file.cc (fhandler_disk_file::fstat_helper): Filter
+ permissions throug umask on FAT or if ntsec is off.
+
2003-05-26 Pierre Humblet <pierre.humblet@ieee.org>
* syscalls.cc (statfs): Call GetDiskFreeSpaceEx before GetDiskFreeSpace.
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 64e1a73ce..30e6785bb 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -331,6 +331,9 @@ fhandler_disk_file::fstat_helper (struct __stat64 *buf, path_conv *pc,
if (pc->exec_state () == is_executable)
buf->st_mode |= STD_XBITS;
+
+ /* This fakes the permissions of all files to match the current umask. */
+ buf->st_mode &= ~(cygheap->umask);
}
/* The number of links to a directory includes the