Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:static int tomoyo_check_unix_address(struct sockaddr *addr, const unsigned int addr_len, struct tomoyo_addr_info *address)

Type:int

Parameter:

TypeParameterName
struct sockaddr *addr
const unsigned intaddr_len
struct tomoyo_addr_info *address
597  u = unix0
599  If addr_len < get the member end offset of(structsockaddr, sa_family) Then Return 0
601  If address family, AF_xxx != Unix domain sockets Then Return 0
603  This may not be '\0' terminated string. = sun_path
604  addr_len = addr_len
605  Return moyo_unix_entry - Check permission for UNIX network operation.*@address: Pointer to "struct tomoyo_addr_info".* Returns 0 on success, negative value otherwise.
Caller
NameDescribe
tomoyo_socket_listen_permissionmoyo_socket_listen_permission - Check permission for listening a socket.*@sock: Pointer to "struct socket".* Returns 0 on success, negative value otherwise.
tomoyo_socket_connect_permissionmoyo_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.
tomoyo_socket_bind_permissionmoyo_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.
tomoyo_socket_sendmsg_permissionmoyo_socket_sendmsg_permission - Check permission for sending a datagram.*@sock: Pointer to "struct socket".*@msg: Pointer to "struct msghdr".*@size: Unused.* Returns 0 on success, negative value otherwise.