函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smk_fetch - Fetch the smack label from a file.*@name: type of the label (attribute)*@ip: a pointer to the inode*@dp: a pointer to the dentry* Returns a pointer to the master list entry for the Smack label,

函数原型:static struct smack_known *smk_fetch(const char *name, struct inode *ip, struct dentry *dp)

返回类型:struct smack_known

参数:

类型参数名称
const char *name
struct inode *ip
struct dentry *dp
285  struct smack_known * skp = NULL
287  如果非i_opflags按位与IOP_XATTR的值则返回:错误号
290  buffer等于分配内存并置零
291  如果(buffer == NULL)则返回:错误号
294  rc等于__vfs_getxattr(dp, ip, name, buffer, SMK_LONGLABEL)
295  如果rc小于0则skp等于错误号
297  否则如果rc恒等于0则skp = NULL
299  否则skp等于smk_import_entry(buffer, rc)
302  释放内存
304  返回:skp
调用者
名称描述
smack_d_instantiatesmack_d_instantiate - Make sure the blob is correct on an inode*@opt_dentry: dentry where inode will be attached*@inode: the object* Set the inode's security blob if it hasn't been done already.