函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static int tomoyo_unix_entry(const struct tomoyo_addr_info *address)

返回类型:int

参数:

类型参数名称
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  如果typetomoyo_init_request_info( & r, NULL, type)不等于TOMOYO_CONFIG_DISABLED
553  buf等于This may not be '\0' terminated string.
554  len等于addr_lensizeof(sa_family_t)
556  如果len小于等于0则
557  buf等于"anonymous"
558  len等于9
559  否则如果buf[0]则
560  len等于字符串长度
562  buf等于tomoyo_encode2(buf, len)
563  如果buf
566  name等于buf
571  address等于addr
572  循环
576  释放内存
577  否则error等于负ENOMEM
580  moyo_read_unlock - Release lock for protecting policy.*@idx: Index number returned by tomoyo_read_lock().* Returns nothing.
581  返回:error
调用者
名称描述
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.