| Function report | 
| Source Code: fs\xattr.c | Create Date:2022-07-28 20:09:57 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Check permissions for extended attribute access. This is a bit complicated* because different namespaces have very different rules.
Proto:static int xattr_permission(struct inode *inode, const char *name, int mask)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct inode * | inode | |
| const char * | name | |
| int | mask | 
| 93 | If IS_IMMUTABLE(inode) || IS_APPEND(inode) Then Return -EPERM | 
| 100 | If HAS_UNMAPPED_ID(inode) Then Return -EPERM | 
| 108 | If Not strncmp(name, XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) || Not strncmp(name, XATTR_SYSTEM_PREFIX, XATTR_SYSTEM_PREFIX_LEN) Then Return 0 | 
| 115 | If Not strncmp(name, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) Then | 
| 116 | If Not Check operation authority Then Return If mask & MAY_WRITE Then -EPERM Else -ENODATA | 
| 118 | Return 0 | 
| 126 | If Not strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN) Then | 
| Name | Describe | 
|---|---|
| vfs_setxattr | |
| vfs_getxattr_alloc | vfs_getxattr_alloc - allocate memory, if necessary, before calling getxattr* Allocate memory, if not already allocated, or re-allocate correct size,* before retrieving the extended attribute. | 
| vfs_getxattr | |
| vfs_removexattr | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |