Cygwin: stat: fix st_mode of fifos again

This partially reverts commit
f36262d56a.  That commit incorrectly
made the st_mode of a fifo reflect the Windows permissions of the disk
file underlying the fifo.
This commit is contained in:
Ken Brown 2020-05-28 13:05:32 -04:00
parent b5089f339a
commit 41ae84e6dc
2 changed files with 4 additions and 1 deletions

View File

@ -491,7 +491,7 @@ fhandler_base::fstat_helper (struct stat *buf)
else
{
buf->st_dev = buf->st_rdev = dev ();
buf->st_mode |= dev ().mode () & S_IFMT;
buf->st_mode = dev ().mode ();
buf->st_size = 0;
}
}

View File

@ -32,3 +32,6 @@ Bug Fixes:
- Make sure pseudo tty doesn't hang if cygwin-console-helper.exe is
non-functional.
Addresses: https://cygwin.com/pipermail/cygwin-patches/2020q2/010191.html
- Fix a bug causing FIFOs to have incorrect permissions.
Addresses: https://sourceware.org/pipermail/cygwin/2020-May/245031.html