Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\selinux\hooks.c Create Date:2022-07-28 18:55:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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).

Proto:static int inode_has_perm(const struct cred *cred, struct inode *inode, unsigned int perms, struct common_audit_data *adp)

Type:int

Parameter:

TypeParameterName
const struct cred *cred
struct inode *inode
unsigned intperms
struct common_audit_data *adp
1676  validate_creds(cred)
1678  If Value for the false possibility is greater at compile time(IS_PRIVATE(inode)) Then Return 0
1681  sid = get the security ID of a set of credentials
1682  isec = selinux_inode(inode)
1684  Return avc_has_perm - Check permissions and perform any appropriate auditing
Caller
NameDescribe
dentry_has_permSame as inode_has_perm, but pass explicit audit data containingthe dentry to help the auditing code to more easily generate thepathname if needed.
path_has_permSame as inode_has_perm, but pass explicit audit data containingthe path to help the auditing code to more easily generate thepathname if needed.
file_path_has_permSame as path_has_perm, but uses the inode from the file struct.
file_has_permCheck 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
selinux_mmap_file