aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext2/xattr_trusted.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext2/xattr_trusted.c')
-rw-r--r--fs/ext2/xattr_trusted.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ext2/xattr_trusted.c b/fs/ext2/xattr_trusted.c
index 52b30ee6a25f..f28a6a499c96 100644
--- a/fs/ext2/xattr_trusted.c
+++ b/fs/ext2/xattr_trusted.c
@@ -7,6 +7,7 @@
7 7
8#include <linux/module.h> 8#include <linux/module.h>
9#include <linux/string.h> 9#include <linux/string.h>
10#include <linux/capability.h>
10#include <linux/fs.h> 11#include <linux/fs.h>
11#include <linux/smp_lock.h> 12#include <linux/smp_lock.h>
12#include <linux/ext2_fs.h> 13#include <linux/ext2_fs.h>
@@ -38,8 +39,6 @@ ext2_xattr_trusted_get(struct inode *inode, const char *name,
38{ 39{
39 if (strcmp(name, "") == 0) 40 if (strcmp(name, "") == 0)
40 return -EINVAL; 41 return -EINVAL;
41 if (!capable(CAP_SYS_ADMIN))
42 return -EPERM;
43 return ext2_xattr_get(inode, EXT2_XATTR_INDEX_TRUSTED, name, 42 return ext2_xattr_get(inode, EXT2_XATTR_INDEX_TRUSTED, name,
44 buffer, size); 43 buffer, size);
45} 44}
@@ -50,8 +49,6 @@ ext2_xattr_trusted_set(struct inode *inode, const char *name,
50{ 49{
51 if (strcmp(name, "") == 0) 50 if (strcmp(name, "") == 0)
52 return -EINVAL; 51 return -EINVAL;
53 if (!capable(CAP_SYS_ADMIN))
54 return -EPERM;
55 return ext2_xattr_set(inode, EXT2_XATTR_INDEX_TRUSTED, name, 52 return ext2_xattr_set(inode, EXT2_XATTR_INDEX_TRUSTED, name,
56 value, size, flags); 53 value, size, flags);
57} 54}