]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: stat: fix st_mode of fifos again
authorKen Brown <kbrown@cornell.edu>
Thu, 28 May 2020 17:05:32 +0000 (13:05 -0400)
committerKen Brown <kbrown@cornell.edu>
Thu, 28 May 2020 17:34:19 +0000 (13:34 -0400)
This partially reverts commit
f36262d56ac78f04de147746ce4a85c6155e4a23.  That commit incorrectly
made the st_mode of a fifo reflect the Windows permissions of the disk
file underlying the fifo.

winsup/cygwin/fhandler_disk_file.cc
winsup/cygwin/release/3.1.5

index 43d81c10f85bb8e406e9df0e859b60f17814350a..c37b3c50416cad7e53597975e7e3c437ea63e4f9 100644 (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;
        }
     }
index 1e3763f6c476b7102d6a9bd7fa34e613f3cc7ba2..0a78f5ff058ab4ef0c074cf617fa5701a260ce78 100644 (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
This page took 0.035584 seconds and 5 git commands to generate.