[PATCH v2 5/6] Cygwin: AF_UNIX: listen_pipe: check for STATUS_SUCCESS

2020-10-04 Thread Ken Brown via Cygwin-patches
A successful connection can be indicated by STATUS_SUCCESS or STATUS_PIPE_CONNECTED. Previously we were checking only for the latter. --- winsup/cygwin/fhandler_socket_unix.cc | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_socket_unix.cc b/winsu

[PATCH v2 4/6] Cygwin: AF_UNIX: socket: set the O_RDWR flag

2020-10-04 Thread Ken Brown via Cygwin-patches
--- winsup/cygwin/fhandler_socket_unix.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/fhandler_socket_unix.cc b/winsup/cygwin/fhandler_socket_unix.cc index 429aa8a90..0ae7fe125 100644 --- a/winsup/cygwin/fhandler_socket_unix.cc +++ b/winsup/cygwin/fhandler_socket_unix.cc @@

[PATCH v2 6/6] Cygwin: AF_UNIX: open_pipe: call recv_peer_info

2020-10-04 Thread Ken Brown via Cygwin-patches
If open_pipe is called with xchg_sock_info true, call recv_peer_info in addition to send_sock_info. --- winsup/cygwin/fhandler_socket_unix.cc | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_socket_unix.cc b/winsup/cygwin/fhandler_socket_unix.cc inde

[PATCH v2 0/6] Some AF_UNIX fixes

2020-10-04 Thread Ken Brown via Cygwin-patches
I'm about to push these. Corinna, please check them when you return. The only difference between v2 and v1 is that there are a few more fixes. I'm trying to help get the AF_UNIX development going again. I'm mostly working on the topic/af_unix branch. But when I find bugs that exist on master, I

[PATCH v2 3/6] Cygwin: always recognize AF_UNIX sockets as reparse points

2020-10-04 Thread Ken Brown via Cygwin-patches
If __WITH_AF_UNIX is defined when Cygwin is built, then a named AF_UNIX socket is represented by a reparse point with a Cygwin-specific tag and GUID. Make such files recognizable as reparse points (but not as sockets) even if __WITH_AF_UNIX is not defined. That way utilities such as 'ls' and 'rm'

[PATCH v2 2/6] Cygwin: fix handling of known reparse points that are not symlinks

2020-10-04 Thread Ken Brown via Cygwin-patches
Commit aa467e6e, "Cygwin: add AF_UNIX reparse points to path handling", changed check_reparse_point_target so that it could return a positive value on a known reparse point that is not a symlink. But some of the code in check_reparse_point that handles this positive return value was executed uncon

[PATCH v2 1/6] Cygwin: AF_UNIX: use FILE_OPEN_REPARSE_POINT when needed

2020-10-04 Thread Ken Brown via Cygwin-patches
The following Windows system calls currently fail with STATUS_IO_REPARSE_TAG_NOT_HANDLED when called on an AF_UNIX socket: - NtOpenFile in get_file_sd - NtOpenFile in set_file_sd - NtCreateFile in fhandler_base::open Fix this by adding the FILE_OPEN_REPARSE_POINT flag to those calls when the fi