Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2018-03-03 01:39:15 +0300
committerCorinna Vinschen <corinna@vinschen.de>2018-03-03 01:39:15 +0300
commitbe6da79713fcfd157cf84d9efb6d4c4afd6ccf33 (patch)
tree2de3abda61e7f9b6697ebbe08610afc775205170 /winsup
parent00e87078302dcfca3b6ad04fd5af5d8f473171a9 (diff)
Cygwin: AF_UNIX: create pipes with file attribute R/W access
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/fhandler_socket_unix.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_socket_unix.cc b/winsup/cygwin/fhandler_socket_unix.cc
index e865f9ecc..2a439001c 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