We must not open special files (i.e. anything but regular files and directories) with any flag but `O_PATH`. Right now, `from_name_at_with_mount_fds()` opens files indiscriminately of their type, and so this is wrong.
Instead, open the file with `O_PATH` first and use the information we get from `statx()` (which we call anyway) to determine whether it is safe to reopen this file with `O_RDONLY`. This is a follow-up fix for patch 8 in merge request !26 (âCreate file handlesâ?, commit hash a80c3be3c59c9c2aaae3a90ebef2b72d151a2e4c). Thanks to Dave for noticing this in the C virtiofsd series! --- https://gitlab.com/virtio-fs/virtiofsd-rs/-/merge_requests/29
_______________________________________________ Virtio-fs mailing list [email protected] https://listman.redhat.com/mailman/listinfo/virtio-fs
