Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:selinux_inode_post_setxattr

Proto:static void selinux_inode_post_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags)

Type:void

Parameter:

TypeParameterName
struct dentry *dentry
const char *name
const void *value
size_tsize
intflags
3231  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
3236  If strcmp(name, XATTR_NAME_SELINUX) Then
3238  Return
3241  If Not initialized Then
3247  Return
3250  rc = security_context_to_sid_force( & selinux_state, value, size, & newsid)
3252  If rc Then
3253  pr_err("SELinux: unable to map context to SIDfor (%s, %lu), rc=%d\n", s_id, Stat data, not accessed from path walking , - rc)
3256  Return
3259  isec = Get the security label of a dentry's backing inode.
3260  spin_lock( & lock)
3261  security class of this object = inode_mode_to_security_class(i_mode)
3262  SID of this object = newsid
3263  initialization flag = initialized
3264  spin_unlock( & lock)
3266  Return