]> git.karo-electronics.de Git - linux-beck.git/commit
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)
commit55b23bde19c08f14127a27d461a4e079942c7258
tree074f23a530c5bbaccce7068bf2947bf39b60ab16
parentaa38572954ade525817fe88c54faebf85e5a61c0
xattr: Fix error results for non-existent / invisible attributes

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>
fs/xattr.c