[PATCH] Disable AF_UNIX handshake with setsockopt(..., SO_PEERCRED, ...)
Christian Franke
Christian.Franke@t-online.de
Thu Oct 9 18:22:00 GMT 2014
Corinna Vinschen wrote:
>> +int
>> +fhandler_socket::af_local_set_no_getpeereid ()
>> +{
>> + if (get_addr_family () != AF_LOCAL || get_socket_type () != SOCK_STREAM)
>> + {
>> + set_errno (EINVAL);
>> + return -1;
>> + }
>> + if (connect_state () != unconnected)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^'
>
> Wouldn't it make sense to allow this call in the "listener" state as well?
It should work, but I don't see any real world use case.
Christian
More information about the Cygwin-patches
mailing list