ucred module provides an interface to the
ucred interface on Linux, the
interface on OpenBSD, or the
unpcbid interface on NetBSD.
The reason that the interfaces for all three of these are in one module is that they are all essentially the same interface, with only minor implementation differences (such as the order of the fields in the C struct, or the name of the socket option used to retrieve them).
Represents the credentials of a Unix socket's peer.
Get the credentials of the given socket's peer.