pub fn extract_ucred(stream: &UnixStream) -> Result<PeerCredentials>Expand description
Extract UCred (pid/uid) from a connected Unix domain socket.
Uses SO_PEERCRED on Linux to retrieve the peer’s process credentials.
Returns an error if credentials cannot be extracted – the caller MUST
reject the connection. There are no fallback defaults.
§Errors
Returns an error if peer credentials cannot be extracted from the socket.