xattr: Fix error results for non-existent / invisible attributes
authorAndreas Gruenbacher <agruen@kernel.org>
Fri, 27 May 2011 12:50:36 +0000 (14:50 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 27 May 2011 13:43:00 +0000 (09:43 -0400)
Return -ENODATA when trying to read a user.* attribute which cannot
exist: user space otherwise does not have a reasonable way to
distinguish between non-existent and inaccessible attributes.

Likewise, return -ENODATA when an unprivileged process tries to read a
trusted.* attribute: to unprivileged processes, those attributes are
invisible (listxattr() won't include them).

Related to this bug report: https://bugzilla.redhat.com/660613

Signed-off-by: Andreas Gruenbacher <agruen@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

No differences found