函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:moyo_socket_connect_permission - Check permission for setting the remote 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_connect_permission(struct socket *sock, struct sockaddr *addr, int addr_len)

返回类型:int

参数:

类型参数名称
struct socket *sock
struct sockaddr *addr
intaddr_len
690  family等于moyo_sock_family - Get socket's family.*@sk: Pointer to "struct sock".* Returns one of PF_INET, PF_INET6, PF_UNIX or 0.
691  type等于type
693  如果非family则返回:0
695  protocol等于type
697  :type恒等于SOCK_DGRAM
698  :type恒等于SOCK_RAW
699  operation等于send() operation.
700  退出
701  :type恒等于SOCK_STREAM
702  :type恒等于SOCK_SEQPACKET
703  operation等于connect() operation.
704  退出
705  默认
706  返回:0
708  如果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.
710  返回: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_connectmoyo_socket_connect - Check permission for connect().*@sock: Pointer to "struct socket".*@addr: Pointer to "struct sockaddr".*@addr_len: Size of @addr.* Returns 0 on success, negative value otherwise.