4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-21 00:07:36 +08:00

* fhandler_disk_file.cc (fhandler_base::fstat_helper): Drop all "other"

permissions from st_mode, if the reading the file's security descriptor
	failed.  Explain why.
This commit is contained in:
Corinna Vinschen 2009-11-08 10:22:28 +00:00
parent 08e5e79b33
commit aa9681ec35
2 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2009-11-08 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_base::fstat_helper): Drop all "other"
permissions from st_mode, if the reading the file's security descriptor
failed. Explain why.
2009-11-06 Corinna Vinschen <corinna@vinschen.de>
* globals.cc (ro_u_scr): New R/O unicode string.

View File

@ -670,6 +670,12 @@ fhandler_base::fstat_helper (struct __stat64 *buf,
/* This fakes the permissions of all files to match the current umask. */
buf->st_mode &= ~(cygheap->umask);
/* If the FS supports ACLs, we're here because we couldn't even open
the file for READ_CONTROL access. Chances are high that the file's
security descriptor has no ACE for "Everyone", so we should not fake
any access for "others". */
if (has_acls ())
buf->st_mode &= ~(S_IROTH | S_IWOTH | S_IXOTH);
}
done: