Re: [PATCH] Disable AF_UNIX handshake with setsockopt(..., SO_PEERCRED, ...)

2014-10-09 Thread Corinna Vinschen
Hi Christian, On Sep 25 14:40, Christian Franke wrote: > This is a workaround for this problem which blocks ITP postfix: > https://cygwin.com/ml/cygwin/2014-08/msg00420.html > > With the patch, this disables the secret+cred handshakes of the AF_UNIX > emulation: > > int sd = socket(AF_UNIX, SOCK

Re: [PATCH] Disable AF_UNIX handshake with setsockopt(..., SO_PEERCRED, ...)

2014-10-09 Thread Christian Franke
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) ^^^