socket_accept

Function socket_accept 

Source
pub fn socket_accept(
    current_task: &CurrentTask,
    listening_socket: DowncastedFile<'_, SocketFile>,
    accepted_socket: DowncastedFile<'_, SocketFile>,
) -> Result<(), Errno>
Expand description

Checks if the current_task is allowed to accept connections on listening_socket. Sets the security label and SID for the accepted socket to match those of the listening socket. Corresponds to the socket_accept() LSM hook.