diff options
| -rw-r--r-- | fs/jffs2/xattr_trusted.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/jffs2/xattr_trusted.c b/fs/jffs2/xattr_trusted.c index ceaf9c693225..bbd20c16090e 100644 --- a/fs/jffs2/xattr_trusted.c +++ b/fs/jffs2/xattr_trusted.c | |||
| @@ -39,6 +39,9 @@ static size_t jffs2_trusted_listxattr(struct dentry *dentry, char *list, | |||
| 39 | { | 39 | { |
| 40 | size_t retlen = XATTR_TRUSTED_PREFIX_LEN + name_len + 1; | 40 | size_t retlen = XATTR_TRUSTED_PREFIX_LEN + name_len + 1; |
| 41 | 41 | ||
| 42 | if (!capable(CAP_SYS_ADMIN)) | ||
| 43 | return 0; | ||
| 44 | |||
| 42 | if (list && retlen<=list_size) { | 45 | if (list && retlen<=list_size) { |
| 43 | strcpy(list, XATTR_TRUSTED_PREFIX); | 46 | strcpy(list, XATTR_TRUSTED_PREFIX); |
| 44 | strcpy(list + XATTR_TRUSTED_PREFIX_LEN, name); | 47 | strcpy(list + XATTR_TRUSTED_PREFIX_LEN, name); |
