On Sat, 7 Apr 2018, Sebastien Marie wrote: > While running testsuite on third-party program, I found some weird > behaviour on us side regarding socketpair(2) and getpeereid(3). > > I ported the unit test to C (it was Rust) to check more easily. > > It just creates an UNIX domain socket using socketpair(2), and next > check the euid/egid of the peer connected socket. The expected result is > that euid of the peer is the euid of the process. ... > Could I have confirmation if it is a bug or not ? I am unsure if > socketpair(2) should set the peer information or not. But at least, > ENOTCONN is wrong: socketpair(2) returns connected sockets.
That's a bug, IMO: socketpair(2) should support use of getpeereid(3). Philip Guenther
