On Fri, Jul 30, 2021 at 05:01:27PM +0200, Max Reitz wrote:
> The xattr functions want a non-O_PATH FD, so they reopen the lo_inode.fd
> with the flags they need through /proc/self/fd.
>
> Similarly, lo_opendir() needs an O_RDONLY FD. Instead of the
> /proc/self/fd trick, it just uses openat(fd, "
The xattr functions want a non-O_PATH FD, so they reopen the lo_inode.fd
with the flags they need through /proc/self/fd.
Similarly, lo_opendir() needs an O_RDONLY FD. Instead of the
/proc/self/fd trick, it just uses openat(fd, "."), because the FD is
guaranteed to be a directory, so this works.