函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:smack_inode_setsecurity - set smack xattrs*@inode: the object*@name: attribute name*@value: attribute value*@size: size of the attribute*@flags: unused* Sets the named attribute in the appropriate blob* Returns 0 on success, or an error code

函数原型:static int smack_inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags)

返回类型:int

参数:

类型参数名称
struct inode *inode
const char *name
const void *value
size_tsize
intflags
2687  nsp等于smack_inode(inode)
2690  rc等于0
2692  如果value恒等于NULLsize大于SMK_LONGLABELsize恒等于0则返回:负EINVAL
2695  skp等于smk_import_entry(value, size)
2696  如果是错误则返回:错误
2699  如果字符串比较恒等于0则
2700  label of the fso 等于skp
2701  smack inode flags 或等于de is instantiated
2702  返回:0
2707  如果s_magic不等于SOCKFS_MAGIC则返回:负EOPNOTSUPP
2710  sock等于SOCKET_I(inode)
2711  如果(sock == NULL || sk == NULL)则返回:负EOPNOTSUPP
2714  ssp等于sk_security
2716  如果字符串比较恒等于0则 inbound label 等于skp
2718  否则如果字符串比较恒等于0则
2719  outbound label 等于skp
2720  如果sk_family恒等于PF_INET
2727  否则返回:负EOPNOTSUPP
2731  如果sk_family恒等于PF_INET6smk_ipv6_port_label - Smack port access table management*@sock: socket*@address: address* Create or update the port list entry
2735  返回:0
调用者
名称描述
smack_inode_notifysecctxThere used to be a smack_release_secctx hook* that did nothing back when hooks were in a vector.* Now that there's a list such a hook adds cost.