Skip to main content

private_socket

Function private_socket 

Source
pub(crate) fn private_socket(typ: SockType) -> Result<OwnedFd>
Expand description

Create a non-blocking UNIX socket which only its owner can connect to. Linux creates the file of a socket on bind with the mode of the socket minus the umask, so others cannot connect at any time, unlike with a chmod after the bind.