]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: Allow to set SO_PEERCRED zero (v2)
authorMark Geisert <mark@maxrnd.com>
Mon, 7 Dec 2020 10:29:36 +0000 (02:29 -0800)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 7 Dec 2020 15:29:11 +0000 (16:29 +0100)
commit9e573ba50f129bff7b6e1be10cf4bbcb70f1efdd
tree7ee98a06dc82c29e8008511e3fcf9a72434846a9
parent58ac5f985c926bfd1b9efbf1a430e826fe3b668c
Cygwin: Allow to set SO_PEERCRED zero (v2)

The existing code errors as EINVAL any attempt to set a value for
SO_PEERCRED via setsockopt() on an AF_UNIX/AF_LOCAL socket.  But to
enable the workaround set_no_getpeereid behavior for Python one has
to be able to set SO_PEERCRED to zero.  Ergo, this patch.  Python has
no way to specify a NULL pointer for 'optval'.

This v2 of patch allows the original working (i.e., allow NULL,0 for
optval,optlen to mean turn off SO_PEERCRED) in addition to the new
working described above.  The sense of the 'if' stmt is reversed for
readability.
winsup/cygwin/fhandler_socket_local.cc
This page took 0.031105 seconds and 5 git commands to generate.