函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Check whether a task can create a file.

函数原型:static int may_create(struct inode *dir, struct dentry *dentry, u16 tclass)

返回类型:int

参数:

类型参数名称
struct inode *dir
struct dentry *dentry
u16tclass
1814  tsec等于selinux_cred(current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.())
1821  dsec等于Get the security label of an inode.
1822  sbsec等于s_security
1824  sid等于 current SID
1826  type等于LSM_AUDIT_DATA_DENTRY
1827  dentry等于dentry
1829  rc等于avc_has_perm - Check permissions and perform any appropriate auditing
1833  如果rc则返回:rc
1836  rc等于Determine the label for an inode that might be unioned.
1838  如果rc则返回:rc
1841  rc等于avc_has_perm - Check permissions and perform any appropriate auditing
1843  如果rc则返回:rc
1846  返回:avc_has_perm - Check permissions and perform any appropriate auditing
调用者
名称描述
selinux_inode_create
selinux_inode_symlink
selinux_inode_mkdir
selinux_inode_mknod