mirror of
https://github.com/flatpak/flatpak.git
synced 2026-10-28 10:29:42 -04:00
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:
1 parent
6020dbf7f6
commit
7339e32080
1 file changed
+3
-2
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user