函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\selinux\hooks.c Create Date:2022-07-27 20:29:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:selinux_inode_init_security

函数原型:static int selinux_inode_init_security(struct inode *inode, struct inode *dir, const struct qstr *qstr, const char **name, void **value, size_t *len)

返回类型:int

参数:

类型参数名称
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  如果rc则返回:rc
2925  如果 which mount options were specified 按位与Non-mount related flags
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  如果非initialized或非 which mount options were specified 按位与SBLABEL_MNT的值则返回:负EOPNOTSUPP
2935  如果namename等于XATTR_SELINUX_SUFFIX
2938  如果valuelen
2939  rc等于security_sid_to_context_force( & selinux_state, newsid, & context, & clen)
2941  如果rc则返回:rc
2943  value等于context
2944  len等于clen
2947  返回:0