Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:moyo_inet_entry - Check permission for INET network operation.*@address: Pointer to "struct tomoyo_addr_info".* Returns 0 on success, negative value otherwise.

Proto:static int tomoyo_inet_entry(const struct tomoyo_addr_info *address)

Type:int

Parameter:

TypeParameterName
const struct tomoyo_addr_info *address
469  idx = moyo_read_lock - Take lock for protecting policy.* Returns index number for tomoyo_read_unlock().
471  error = 0
472  type = Mapping table from "enum tomoyo_network_acl_index" to* "enum tomoyo_mac_index" for inet domain socket.[protocol][operation]
474  If type && tomoyo_init_request_info( & r, NULL, type) != TOMOYO_CONFIG_DISABLED Then
476  param_type = TOMOYO_TYPE_INET_ACL
477  One of values smaller than TOMOYO_SOCK_MAX. = protocol
478  One of values in "enum tomoyo_network_acl_index". = operation
479  is_ipv6 = is_ipv6
480  address = In network byte order.
481  port = ntohs(In network byte order. )
482  Do
485  When error == Retry this request. Returned by tomoyo_supervisor() if policy violation has* occurred in enforcing mode and the userspace daemon decided to retry.* We must choose a positive value in order to distinguish "granted" (which is cycle
487  moyo_read_unlock - Release lock for protecting policy.*@idx: Index number returned by tomoyo_read_lock().* Returns nothing.
488  Return error
Caller
NameDescribe
tomoyo_check_inet_addressmoyo_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".