-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
virtio/fs/linux: Fix xattrs on symlinks
The f*attr library of functions only works on files opened normally. Symlinks can only be opened with O_PATH, but that doesn't support xattr operations. So, to handle symlinks, we need to use the l*attr family of functions directly on the pathname. Thankfully, this does still work via /proc/self/fd/* for fds opened with O_PATH, so we can still do fd-relative operations (l*attr on such a path resolves the magic symlink and operates on the symlink that is actually opened as that fd). Signed-off-by: Asahi Lina <[email protected]>
- Loading branch information
Showing
1 changed file
with
118 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters