]> git.ipfire.org Git - thirdparty/systemd.git/commit
xattr-util: try new *xattrat() family syscalls first
authorMike Yuan <me@yhndnzj.com>
Mon, 20 Jan 2025 19:43:02 +0000 (20:43 +0100)
committerMike Yuan <me@yhndnzj.com>
Sun, 9 Feb 2025 13:51:04 +0000 (14:51 +0100)
commitb8df25dcfe674e37ceb3d54e00a31e1d33e96057
treef6550d0b1680fbe39a5a80b916a7d66157eff720
parentbaca3581ea4a6db15ceb95370bf3e5e5990d513a
xattr-util: try new *xattrat() family syscalls first

Added in https://github.com/torvalds/linux/commit/6140be90ec70c39fa844741ca3cc807dd0866394

However, when O_PATH fds are encountered we'd have to go by
/proc/self/fd/ still, since the kernel people are reluctant
to make the new syscalls work with them
(https://lore.kernel.org/linux-fsdevel/20250206-steril-raumplanung-733224062432@brauner/)
Hence getxattrat() and listxattrat() are not employed.

While at it, remove the discrepancy between path being NULL
and empty - I don't grok the "security issue" claimed earlier,
but nowadays even the kernel treats the two as identical:
https://github.com/torvalds/linux/commit/e896474fe4851ffc4dd860c92daa906783090346
README
src/basic/xattr-util.c
src/basic/xattr-util.h
src/shared/copy.c
src/test/test-xattr-util.c