Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

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

Type:int

Parameter:

TypeParameterName
const struct tomoyo_addr_info *address
546  idx = moyo_read_lock - Take lock for protecting policy.* Returns index number for tomoyo_read_unlock().
548  error = 0
549  type = Mapping table from "enum tomoyo_network_acl_index" to* "enum tomoyo_mac_index" for unix domain socket.[protocol][operation]
551  If type && tomoyo_init_request_info( & r, NULL, type) != TOMOYO_CONFIG_DISABLED Then
553  buf = This may not be '\0' terminated string.
554  len = addr_len - sizeof(sa_family_t)
556  If len <= 0 Then
557  buf = "anonymous"
558  len = 9
559  Else if buf[0] Then
562  buf = tomoyo_encode2(buf, len)
563  If buf Then
566  name = buf
571  address = addr
572  Do
576  kfree(buf)
577  Else error = -ENOMEM
580  moyo_read_unlock - Release lock for protecting policy.*@idx: Index number returned by tomoyo_read_lock().* Returns nothing.
581  Return error
Caller
NameDescribe
tomoyo_check_unix_addressmoyo_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.