函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smack_inode_getsecurity - get smack xattrs*@inode: the object*@name: attribute name*@buffer: where to put the result*@alloc: duplicate memory* Returns the size of the attribute or an error code

函数原型:static int smack_inode_getsecurity(struct inode *inode, const char *name, void **buffer, bool alloc)

返回类型:int

参数:

类型参数名称
struct inode *inode
const char *name
void **buffer
boolalloc
1441  ip等于inode
1444  如果字符串比较恒等于0则isp等于Present a pointer to the smack label entry in an inode blob.
1446  否则
1450  sbp等于i_sb
1451  如果s_magic不等于SOCKFS_MAGIC则返回:负EOPNOTSUPP
1454  sock等于SOCKET_I(ip)
1455  如果(sock == NULL || sk == NULL)则返回:负EOPNOTSUPP
1458  ssp等于sk_security
1460  如果字符串比较恒等于0则isp等于 inbound label
1462  否则如果字符串比较恒等于0则isp等于 outbound label
1464  否则返回:负EOPNOTSUPP
1468  如果alloc
1469  buffer等于kstrdup - allocate space for and copy an existing string*@s: the string to duplicate*@gfp: the GFP mask used in the kmalloc() call when allocating memory* Return: newly allocated copy of @s or %NULL in case of error
1470  如果( * buffer == NULL)则返回:负ENOMEM
1474  返回:strlen - Find the length of a string*@s: The string to be sized