pub fn peer_groups(sock: impl AsFd, max: usize) -> Result<Vec<u32>>Expand description
Returns the raw ids of the supplementary groups of the peer of the
Unix socket sock. The peer must have at most max groups.
The kernel records the groups when the peer connects, or when it creates the socket pair. The list is in the order of the kernel.
ยงErrors
ERANGEif the peer has more thanmaxgroups.ENODATAif the socket has no peer credentials, for example a listening socket.ENOTSOCKifsockis not a socket, andENOPROTOOPTif it is not a Unix socket.- Another
Errnofromgetsockopt(SO_PEERGROUPS).