Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\network.c Create Date:2022-07-28 19:45:38
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:moyo_socket_listen_permission - Check permission for listening a socket.*@sock: Pointer to "struct socket".* Returns 0 on success, negative value otherwise.

Proto:int tomoyo_socket_listen_permission(struct socket *sock)

Type:int

Parameter:

TypeParameterName
struct socket *sock
653  family = moyo_sock_family - Get socket's family.*@sk: Pointer to "struct sock".* Returns one of PF_INET, PF_INET6, PF_UNIX or 0.
654  type = type
658  If Not family || type != SOCK_STREAM && type != SOCK_SEQPACKET Then Return 0
661  error = getname(sock, (structsockaddr * ) & addr, 0)
664  If error < 0 Then Return error
666  addr_len = error
668  protocol = type
669  operation = listen() operation.
670  If family == PF_UNIX Then Return moyo_check_unix_address - Check permission for unix domain socket's operation.*@addr: Pointer to "struct sockaddr".*@addr_len: Size of @addr.*@address: Pointer to "struct tomoyo_addr_info".* Returns 0 on success, negative value otherwise.
673  Return moyo_check_inet_address - Check permission for inet domain socket's operation.*@addr: Pointer to "struct sockaddr".*@addr_len: Size of @addr.*@port: Port number.*@address: Pointer to "struct tomoyo_addr_info".
Caller
NameDescribe
tomoyo_socket_listenmoyo_socket_listen - Check permission for listen().*@sock: Pointer to "struct socket".*@backlog: Backlog parameter.* Returns 0 on success, negative value otherwise.