1 #include <linux/reiserfs_fs.h>
2 #include <linux/errno.h>
4 #include <linux/pagemap.h>
5 #include <linux/xattr.h>
6 #include <linux/reiserfs_xattr.h>
7 #include <asm/uaccess.h>
9 #define XATTR_SECURITY_PREFIX "security."
12 security_get(struct inode *inode, const char *name, void *buffer, size_t size)
14 if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX))
17 if (is_reiserfs_priv_object(inode))
20 return reiserfs_xattr_get(inode, name, buffer, size);
24 security_set(struct inode *inode, const char *name, const void *buffer,
25 size_t size, int flags)
27 if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX))
30 if (is_reiserfs_priv_object(inode))
33 return reiserfs_xattr_set(inode, name, buffer, size, flags);
36 static int security_del(struct inode *inode, const char *name)
38 if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX))
41 if (is_reiserfs_priv_object(inode))
48 security_list(struct inode *inode, const char *name, int namelen, char *out)
52 if (is_reiserfs_priv_object(inode))
56 memcpy(out, name, len);
61 struct reiserfs_xattr_handler security_handler = {
62 .prefix = XATTR_SECURITY_PREFIX,
66 .list = security_list,