Skip to content

Strip shared directory from mountinfo’s mount points with sandbox=chroot

Hanna Czenczek requested to merge hreitz/virtiofsd-rs:file-handles-chroot into main

When using sandbox=chroot, /proc/self/mountinfo still contains the pre-chroot mount point paths. To open them, we need to strip the shared directory as a prefix from them.

This series does so by first canonicalizing the shared directory path, and then (when using sandbox=chroot) stripping it from every mount point in /proc/self/mountinfo that we want to open.

(Reported by German)

Merge request reports