Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:selinux_inode_init_security

Proto:static int selinux_inode_init_security(struct inode *inode, struct inode *dir, const struct qstr *qstr, const char **name, void **value, size_t *len)

Type:int

Parameter:

TypeParameterName
struct inode *inode
struct inode *dir
const struct qstr *qstr
const char **name
void **value
size_t *len
2907  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.())
2913  sbsec = s_security
2915  newsid = fscreate SID
2917  rc = Determine the label for an inode that might be unioned.
2921  If rc Then Return rc
2925  If which mount options were specified & Non-mount related flags Then
2926  isec = selinux_inode(inode)
2927  security class of this object = inode_mode_to_security_class(i_mode)
2928  SID of this object = newsid
2929  initialization flag = initialized
2932  If Not initialized || Not ( which mount options were specified & SBLABEL_MNT) Then Return -EOPNOTSUPP
2935  If name Then name = XATTR_SELINUX_SUFFIX
2938  If value && len Then
2939  rc = security_sid_to_context_force( & selinux_state, newsid, & context, & clen)
2941  If rc Then Return rc
2943  value = context
2944  len = clen
2947  Return 0