xattr: handle AT_EMPTY_PATH correctly
Currently fsetxattr() and fgetxattr() don't work with O_PATH file
descriptors and there's userspace code out there e.g., in systemd that
relies on the fact that O_PATH file descriptors cannot be used to set or
get extended attributes.
Additionally, we recently decided that AT_EMPTY_PATH requests should be
handled without doing all the unnecessary path lookup (see fstat()). So
handle AT_EMPTY_PATH requests properly through fdget() and not like in
user_path_at() through fdget_raw().
Signed-off-by: Christian Brauner <brauner@kernel.org>
1 file changed