aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/xattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/xattr.c')
-rw-r--r--fs/ubifs/xattr.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c
index 259fbabf143d..e8b01b721e99 100644
--- a/fs/ubifs/xattr.c
+++ b/fs/ubifs/xattr.c
@@ -588,46 +588,6 @@ out_free:
588 return err; 588 return err;
589} 589}
590 590
591static size_t security_listxattr(struct dentry *d, char *list, size_t list_size,
592 const char *name, size_t name_len, int flags)
593{
594 const int prefix_len = XATTR_SECURITY_PREFIX_LEN;
595 const size_t total_len = prefix_len + name_len + 1;
596
597 if (list && total_len <= list_size) {
598 memcpy(list, XATTR_SECURITY_PREFIX, prefix_len);
599 memcpy(list + prefix_len, name, name_len);
600 list[prefix_len + name_len] = '\0';
601 }
602
603 return total_len;
604}
605
606static int security_getxattr(struct dentry *d, const char *name, void *buffer,
607 size_t size, int flags)
608{
609 return ubifs_getxattr(d, name, buffer, size);
610}
611
612static int security_setxattr(struct dentry *d, const char *name,
613 const void *value, size_t size, int flags,
614 int handler_flags)
615{
616 return ubifs_setxattr(d, name, value, size, flags);
617}
618
619static const struct xattr_handler ubifs_xattr_security_handler = {
620 .prefix = XATTR_SECURITY_PREFIX,
621 .list = security_listxattr,
622 .get = security_getxattr,
623 .set = security_setxattr,
624};
625
626const struct xattr_handler *ubifs_xattr_handlers[] = {
627 &ubifs_xattr_security_handler,
628 NULL,
629};
630
631static int init_xattrs(struct inode *inode, const struct xattr *xattr_array, 591static int init_xattrs(struct inode *inode, const struct xattr *xattr_array,
632 void *fs_info) 592 void *fs_info)
633{ 593{