Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ap_inode_setxattr - Determine whether an xattr may be altered*@dentry: The inode/dentry being altered*@name: The name of the xattr to be changed*@value: The value that the xattr will be changed to*@size: The size of value*@flags: The replacement flag*

Proto:int cap_inode_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags)

Type:int

Parameter:

TypeParameterName
struct dentry *dentry
const char *name
const void *value
size_tsize
intflags
914  user_ns = s_user_ns
917  If strncmp(name, XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) != 0 Then Return 0
925  If strcmp(name, XATTR_NAME_CAPS) == 0 Then Return 0
928  If Not ns_capable(user_ns, Allow setting zone reclaim policy ) Then Return -EPERM
930  Return 0
Caller
NameDescribe
security_inode_setxattr
selinux_inode_setxattr
smack_inode_setxattrsmack_inode_setxattr - Smack check for setting xattrs*@dentry: the object*@name: name of the attribute*@value: value of the attribute*@size: size of the value*@flags: unused* This protects the Smack attribute explicitly