[PATCH] Cygwin: allow opening an AF_LOCAL/AF_UNIX socket with O_PATH
Corinna Vinschen
corinna-cygwin@cygwin.com
Fri Jan 17 09:51:00 GMT 2020
On Jan 17 10:48, Corinna Vinschen wrote:
> On Jan 16 18:34, Ken Brown wrote:
> > If that flag is not set, or if an attempt is made to open a different
> > type of socket, the errno is now EOPNOTSUPP instead of ENXIO. This is
> > consistent with POSIX, starting with the 2016 edition. Earlier
> > editions were silent on this issue.
> > ---
> > winsup/cygwin/fhandler.h | 2 ++
> > winsup/cygwin/fhandler_socket.cc | 2 +-
> > winsup/cygwin/fhandler_socket_local.cc | 16 ++++++++++++++++
> > winsup/cygwin/fhandler_socket_unix.cc | 16 ++++++++++++++++
> > winsup/cygwin/release/3.1.3 | 7 +++++++
> > winsup/doc/new-features.xml | 6 ++++++
> > 6 files changed, 48 insertions(+), 1 deletion(-)
>
> I'm a bit concerned here that some function calls might succeed
> accidentally or even crash, given that the original socket code doesn't
> cope with the nohandle flag. Did you perform some basic testing?
Iow, do the usual socket calls on a fhandler_socket_local return EBADF
now? Ignoring fhandler_socket_unix for now.
Corinna
--
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20200117/73c6dbf0/attachment.sig>
More information about the Cygwin-patches
mailing list