public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Ken Brown <kbrown@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: stat: fix st_mode of fifos again
Date: Thu, 28 May 2020 17:34:33 +0000 (GMT)	[thread overview]
Message-ID: <20200528173433.BED893870845@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=41ae84e6dcd810b9c94f1bbd5e00e6c8a28ccb94

commit 41ae84e6dcd810b9c94f1bbd5e00e6c8a28ccb94
Author: Ken Brown <kbrown@cornell.edu>
Date:   Thu May 28 13:05:32 2020 -0400

    Cygwin: stat: fix st_mode of fifos again
    
    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.

Diff:
---
 winsup/cygwin/fhandler_disk_file.cc | 2 +-
 winsup/cygwin/release/3.1.5         | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 43d81c10f..c37b3c504 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -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;
 	}
     }
diff --git a/winsup/cygwin/release/3.1.5 b/winsup/cygwin/release/3.1.5
index 1e3763f6c..0a78f5ff0 100644
--- a/winsup/cygwin/release/3.1.5
+++ b/winsup/cygwin/release/3.1.5
@@ -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


                 reply	other threads:[~2020-05-28 17:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200528173433.BED893870845@sourceware.org \
    --to=kbrown@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).