Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:selinux_inode_setsecurity

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

Type:int

Parameter:

TypeParameterName
struct inode *inode
const char *name
const void *value
size_tsize
intflags
3391  isec = inode_security_novalidate(inode)
3392  sbsec = s_security
3396  If strcmp(name, XATTR_SELINUX_SUFFIX) Then Return -EOPNOTSUPP
3399  If Not ( which mount options were specified & SBLABEL_MNT) Then Return -EOPNOTSUPP
3402  If Not value || Not size Then Return -EACCES
3405  rc = security_context_to_sid( & selinux_state, value, size, & newsid, GFP_KERNEL)
3407  If rc Then Return rc
3410  spin_lock( & lock)
3411  security class of this object = inode_mode_to_security_class(i_mode)
3412  SID of this object = newsid
3413  initialization flag = initialized
3414  spin_unlock( & lock)
3415  Return 0
Caller
NameDescribe
selinux_inode_notifysecctxalled with inode->i_mutex locked