xattrs: Use /proc/self/fd path in glnx_fd_get_all_xattrs

This allows it to work on O_PATH file descriptors, which is needed for
operating on symlinks.
This commit is contained in:
Sebastian Wick committed 2026-08-19 14:57:39 +00:00
1 parent 6020dbf7f6
commit 7339e32080
1 file changed
+3 -2
+3 -2
View File
@@ -229,8 +229,9 @@ glnx_fd_get_all_xattrs (int fd,
GCancellable *cancellable,
GError **error)
{
return get_xattrs_impl (NULL, fd, out_xattrs,
cancellable, error);
char buf[PATH_MAX];
snprintf (buf, sizeof (buf), "/proc/self/fd/%d", fd);
return get_xattrs_impl (buf, -1, out_xattrs, cancellable, error);
}
/**