Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:selinux_inode_setattr

Proto:static int selinux_inode_setattr(struct dentry *dentry, struct iattr *iattr)

Type:int

Parameter:

TypeParameterName
struct dentry *dentry
struct iattr *iattr
3092  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.()
3093  inode = d_backing_inode - Get upper or lower inode we should be using*@upper: The upper layer* This is the helper that should be used to get at the inode that will be used* if this dentry were to be opened as a file. The inode may be on the upper
3094  ia_valid = ia_valid
3095  av = FILE__WRITE
3098  If ia_valid & Not a change, but a change it Then
3099  ia_valid &= ~( ATTR_KILL_SUID | ATTR_KILL_SGID | Attribute flags. These should be or-ed together to figure out what* has been changed! | Not a change, but a change it )
3101  If Not ia_valid Then Return 0
3105  If ia_valid & ( Attribute flags. These should be or-ed together to figure out what* has been changed! | ATTR_UID | ATTR_GID | ATTR_ATIME_SET | ATTR_MTIME_SET | ATTR_TIMES_SET) Then Return Same as inode_has_perm, but pass explicit audit data containingthe dentry to help the auditing code to more easily generate thepathname if needed.
3109  If selinux_policycap_openperm() && s_magic != SOCKFS_MAGIC && ia_valid & ATTR_SIZE && Not (ia_valid & ATTR_FILE) Then av |= FILE__OPEN
3115  Return Same as inode_has_perm, but pass explicit audit data containingthe dentry to help the auditing code to more easily generate thepathname if needed.