-
Notifications
You must be signed in to change notification settings - Fork 256
Open
Description
Try running this in one terminal to cause the mount table to change frequently:
$ mkdir from to
$ while true; do sudo mount --bind from to && sudo umount to; done
And run bwrap repeatedly in another terminal:
$ while true; do bwrap --bind / / -- /bin/true && echo -n .; done
...................................................................................................bwrap: Can't bind mount /oldroot/ on /newroot/: Unable to apply mount flags: remount "/newroot/<redacted>/to": Invalid argument
.....................................................................................................................................................................................................................................................................................................................................bwrap: Can't bind mount /oldroot/ on /newroot/: Unable to apply mount flags: remount "/newroot/<redacted>/to": Invalid argument
..............................................................................................................................................................................................................................................................................................................................................................................................................bwrap: Can't bind mount /oldroot/ on /newroot/: Unable to apply mount flags: remount "/newroot/<redacted>/to": Invalid argument
.....................................
This likely happens because the bind_mount
function grabs the current mount table (
Line 438 in 973fe36
mount_tab = parse_mountinfo (proc_fd, kernel_case_combination); |
--bind
works recursively but fails if any of the sub-mounts fail (Line 472 in 973fe36
mount ("none", mount_tab[i].mountpoint, |
It already checks that errno != EACCES
; perhaps this failure can be excluded in the same way.
Metadata
Metadata
Assignees
Labels
No labels