containers / bubblewrap

Low-level unprivileged sandboxing tool used by Flatpak and similar projects
Other
3.75k stars 230 forks source link

Falling back to chroot() if pivot_root() fails #595

Open dmikushin opened 9 months ago

dmikushin commented 9 months ago

In #594 I've found that bubblewrap fails due to pivot_root(), when binding folder on an NFS filesystem. It would be a pity to fail the entire bubblewrap due to this problem. So I propose a fallback mode: if pivot_root() fails, we try to continue setup with chroot(). Yes: chroot() yields some limitations, such as disabled unsharing mode and disabled uid/gid mapping. But it is still better than nothing, isn't it?