函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Check whether a task can use an open file descriptor toaccess an inode in a given way. Check access to thedescriptor itself, and then use dentry_has_perm tocheck a particular permission to the file.Access to the descriptor is implicitly granted if it

函数原型:static int file_has_perm(const struct cred *cred, struct file *file, unsigned int av)

返回类型:int

参数:

类型参数名称
const struct cred *cred
struct file *file
unsigned intav
1748  fsec等于selinux_file(file)
1749  inode等于file_inode(file)
1751  sid等于get the security ID of a set of credentials
1754  type等于LSM_AUDIT_DATA_FILE
1755  file等于file
1757  如果sid不等于 SID of open file description
1758  rc等于avc_has_perm - Check permissions and perform any appropriate auditing
1763  如果rc则转到:out
1774  rc等于0
1775  如果avrc等于Check whether a task has a particular permission to an inode.The 'adp' parameter is optional and allows other auditdata to be passed (e.g. the dentry).
1778  out :
1779  返回:rc
调用者
名称描述
match_file
selinux_revalidate_file_permissionle security operations
selinux_file_ioctl
file_map_prot_check
selinux_file_mprotect
selinux_file_lock
selinux_file_fcntl
selinux_file_receive