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>
10 security_get(struct inode
*inode
, const char *name
, void *buffer
, size_t size
)
12 if (strlen(name
) < sizeof(XATTR_SECURITY_PREFIX
))
15 if (is_reiserfs_priv_object(inode
))
18 return reiserfs_xattr_get(inode
, name
, buffer
, size
);
22 security_set(struct inode
*inode
, const char *name
, const void *buffer
,
23 size_t size
, int flags
)
25 if (strlen(name
) < sizeof(XATTR_SECURITY_PREFIX
))
28 if (is_reiserfs_priv_object(inode
))
31 return reiserfs_xattr_set(inode
, name
, buffer
, size
, flags
);
34 static int security_del(struct inode
*inode
, const char *name
)
36 if (strlen(name
) < sizeof(XATTR_SECURITY_PREFIX
))
39 if (is_reiserfs_priv_object(inode
))
46 security_list(struct inode
*inode
, const char *name
, int namelen
, char *out
)
50 if (is_reiserfs_priv_object(inode
))
54 memcpy(out
, name
, len
);
59 struct reiserfs_xattr_handler security_handler
= {
60 .prefix
= XATTR_SECURITY_PREFIX
,
64 .list
= security_list
,