函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\tomoyo\network.c Create Date:2022-07-27 21:14:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

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

函数原型:int tomoyo_socket_listen_permission(struct socket *sock)

返回类型:int

参数:

类型参数名称
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  如果非familytype不等于SOCK_STREAMtype不等于SOCK_SEQPACKET则返回:0
661  error等于getname(sock, (structsockaddr * ) & addr, 0)
664  如果error小于0则返回:error
666  addr_len等于error
668  protocol等于type
669  operation等于listen() operation.
670  如果family恒等于PF_UNIX则返回: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  返回: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".
调用者
名称描述
tomoyo_socket_listenmoyo_socket_listen - Check permission for listen().*@sock: Pointer to "struct socket".*@backlog: Backlog parameter.* Returns 0 on success, negative value otherwise.