diff options
Diffstat (limited to 'include/linux/xattr.h')
| -rw-r--r-- | include/linux/xattr.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/include/linux/xattr.h b/include/linux/xattr.h index aed54c50aa66..e5d122031542 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h | |||
| @@ -30,6 +30,9 @@ | |||
| 30 | #define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1) | 30 | #define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1) |
| 31 | 31 | ||
| 32 | /* Security namespace */ | 32 | /* Security namespace */ |
| 33 | #define XATTR_EVM_SUFFIX "evm" | ||
| 34 | #define XATTR_NAME_EVM XATTR_SECURITY_PREFIX XATTR_EVM_SUFFIX | ||
| 35 | |||
| 33 | #define XATTR_SELINUX_SUFFIX "selinux" | 36 | #define XATTR_SELINUX_SUFFIX "selinux" |
| 34 | #define XATTR_NAME_SELINUX XATTR_SECURITY_PREFIX XATTR_SELINUX_SUFFIX | 37 | #define XATTR_NAME_SELINUX XATTR_SECURITY_PREFIX XATTR_SELINUX_SUFFIX |
| 35 | 38 | ||
| @@ -49,6 +52,11 @@ | |||
| 49 | #define XATTR_CAPS_SUFFIX "capability" | 52 | #define XATTR_CAPS_SUFFIX "capability" |
| 50 | #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX | 53 | #define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX |
| 51 | 54 | ||
| 55 | #define XATTR_POSIX_ACL_ACCESS "posix_acl_access" | ||
| 56 | #define XATTR_NAME_POSIX_ACL_ACCESS XATTR_SYSTEM_PREFIX XATTR_POSIX_ACL_ACCESS | ||
| 57 | #define XATTR_POSIX_ACL_DEFAULT "posix_acl_default" | ||
| 58 | #define XATTR_NAME_POSIX_ACL_DEFAULT XATTR_SYSTEM_PREFIX XATTR_POSIX_ACL_DEFAULT | ||
| 59 | |||
| 52 | #ifdef __KERNEL__ | 60 | #ifdef __KERNEL__ |
| 53 | 61 | ||
| 54 | #include <linux/types.h> | 62 | #include <linux/types.h> |
| @@ -67,6 +75,12 @@ struct xattr_handler { | |||
| 67 | size_t size, int flags, int handler_flags); | 75 | size_t size, int flags, int handler_flags); |
| 68 | }; | 76 | }; |
| 69 | 77 | ||
| 78 | struct xattr { | ||
| 79 | char *name; | ||
| 80 | void *value; | ||
| 81 | size_t value_len; | ||
| 82 | }; | ||
| 83 | |||
| 70 | ssize_t xattr_getsecurity(struct inode *, const char *, void *, size_t); | 84 | ssize_t xattr_getsecurity(struct inode *, const char *, void *, size_t); |
| 71 | ssize_t vfs_getxattr(struct dentry *, const char *, void *, size_t); | 85 | ssize_t vfs_getxattr(struct dentry *, const char *, void *, size_t); |
| 72 | ssize_t vfs_listxattr(struct dentry *d, char *list, size_t size); | 86 | ssize_t vfs_listxattr(struct dentry *d, char *list, size_t size); |
| @@ -78,7 +92,10 @@ ssize_t generic_getxattr(struct dentry *dentry, const char *name, void *buffer, | |||
| 78 | ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size); | 92 | ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size); |
| 79 | int generic_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags); | 93 | int generic_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags); |
| 80 | int generic_removexattr(struct dentry *dentry, const char *name); | 94 | int generic_removexattr(struct dentry *dentry, const char *name); |
| 81 | 95 | ssize_t vfs_getxattr_alloc(struct dentry *dentry, const char *name, | |
| 96 | char **xattr_value, size_t size, gfp_t flags); | ||
| 97 | int vfs_xattr_cmp(struct dentry *dentry, const char *xattr_name, | ||
| 98 | const char *value, size_t size, gfp_t flags); | ||
| 82 | #endif /* __KERNEL__ */ | 99 | #endif /* __KERNEL__ */ |
| 83 | 100 | ||
| 84 | #endif /* _LINUX_XATTR_H */ | 101 | #endif /* _LINUX_XATTR_H */ |
