Commit bf781714 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Al Viro
Browse files

jffs2: Add missing capability check for listing trusted xattrs

The vfs checks if a task has the appropriate access for get and set
operations, but it cannot do that for the list operation; the file system
must check for that itself.
Signed-off-by: default avatarAndreas Gruenbacher <>
Reviewed-by: default avatarChristoph Hellwig <>
Cc: David Woodhouse <>
Signed-off-by: default avatarAl Viro <>
parent e282fb7f
......@@ -39,6 +39,9 @@ static size_t jffs2_trusted_listxattr(struct dentry *dentry, char *list,
size_t retlen = XATTR_TRUSTED_PREFIX_LEN + name_len + 1;
if (!capable(CAP_SYS_ADMIN))
return 0;
if (list && retlen<=list_size) {
strcpy(list + XATTR_TRUSTED_PREFIX_LEN, name);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment