This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin] Cygwin: AF_UNIX: create pipes with file attribute R/W access


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

commit be6da79713fcfd157cf84d9efb6d4c4afd6ccf33
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Fri Mar 2 23:39:15 2018 +0100

    Cygwin: AF_UNIX: create pipes with file attribute R/W access
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/fhandler_socket_unix.cc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/fhandler_socket_unix.cc b/winsup/cygwin/fhandler_socket_unix.cc
index e865f9e..2a43900 100644
--- a/winsup/cygwin/fhandler_socket_unix.cc
+++ b/winsup/cygwin/fhandler_socket_unix.cc
@@ -451,7 +451,9 @@ fhandler_socket_unix::create_pipe ()
   ULONG max_instances;
   LARGE_INTEGER timeout;
 
-  access = GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE;
+  access = GENERIC_READ | FILE_READ_ATTRIBUTES
+	   | GENERIC_WRITE |  FILE_WRITE_ATTRIBUTES
+	   | SYNCHRONIZE;
   sharing = FILE_SHARE_READ | FILE_SHARE_WRITE;
   InitializeObjectAttributes (&attr, pc.get_nt_native_path (), OBJ_INHERIT,
 			      NULL, NULL);
@@ -484,8 +486,11 @@ fhandler_socket_unix::create_pipe_instance ()
   ULONG max_instances;
   LARGE_INTEGER timeout;
 
-  access = GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE;
+  access = GENERIC_READ | FILE_READ_ATTRIBUTES
+	   | GENERIC_WRITE |  FILE_WRITE_ATTRIBUTES
+	   | SYNCHRONIZE;
   sharing = FILE_SHARE_READ | FILE_SHARE_WRITE;
+  /* NPFS doesn't understand reopening by handle, unfortunately. */
   InitializeObjectAttributes (&attr, pc.get_nt_native_path (), OBJ_INHERIT,
 			      NULL, NULL);
   nonblocking = is_nonblocking () ? FILE_PIPE_COMPLETE_OPERATION


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]