函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:moyo_socket_bind_permission - Check permission for setting the local address of a socket.*@sock: Pointer to "struct socket".*@addr: Pointer to "struct sockaddr".*@addr_len: Size of @addr.* Returns 0 on success, negative value otherwise.

函数原型:int tomoyo_socket_bind_permission(struct socket *sock, struct sockaddr *addr, int addr_len)

返回类型:int

参数:

类型参数名称
struct socket *sock
struct sockaddr *addr
intaddr_len
727  family等于moyo_sock_family - Get socket's family.*@sk: Pointer to "struct sock".* Returns one of PF_INET, PF_INET6, PF_UNIX or 0.
728  type等于type
730  如果非family则返回:0
733  :type恒等于SOCK_STREAM
734  :type恒等于SOCK_DGRAM
735  :type恒等于SOCK_RAW
736  :type恒等于SOCK_SEQPACKET
737  protocol等于type
738  operation等于d() operation.
739  退出
740  默认
741  返回:0
743  如果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.
745  返回: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_bindmoyo_socket_bind - Check permission for bind().*@sock: Pointer to "struct socket".*@addr: Pointer to "struct sockaddr".*@addr_len: Size of @addr.* Returns 0 on success, negative value otherwise.