feat(abs): improve mount rule for bwrap.
This commit is contained in:
parent
f1b01d03cd
commit
532162f302
1 changed files with 10 additions and 9 deletions
|
|
@ -13,14 +13,16 @@
|
||||||
|
|
||||||
network netlink raw,
|
network netlink raw,
|
||||||
|
|
||||||
mount options=(rw rbind) /oldroot/{,**/} -> /newroot/{,**/},
|
mount options=(rw rbind) /tmp/newroot/ -> /tmp/newroot/,
|
||||||
|
mount options=(rw rbind) /oldroot/{,**} -> /newroot/{,**},
|
||||||
mount options=(rw silent rprivate) -> /oldroot/,
|
mount options=(rw silent rprivate) -> /oldroot/,
|
||||||
mount options=(rw silent rslave) -> /,
|
mount options=(rw silent rslave) -> /,
|
||||||
mount fstype=devpts options=(rw nosuid noexec) devpts -> /newroot/dev/pts/,
|
mount fstype=devpts options=(rw nosuid noexec) devpts -> /newroot/dev/pts/,
|
||||||
|
mount fstype=proc options=(rw nosuid nodev noexec) proc -> /newroot/@{PROC}/,
|
||||||
mount fstype=tmpfs options=(rw nosuid nodev) tmpfs -> /newroot/dev/,
|
mount fstype=tmpfs options=(rw nosuid nodev) tmpfs -> /newroot/dev/,
|
||||||
mount fstype=tmpfs options=(rw nosuid nodev) tmpfs -> /tmp/,
|
mount fstype=tmpfs options=(rw nosuid nodev) tmpfs -> /tmp/,
|
||||||
|
|
||||||
remount /newroot/{,**/},
|
remount /newroot/{,**},
|
||||||
|
|
||||||
umount /,
|
umount /,
|
||||||
umount /oldroot/,
|
umount /oldroot/,
|
||||||
|
|
@ -29,8 +31,7 @@
|
||||||
pivot_root oldroot=/tmp/oldroot/ /tmp/,
|
pivot_root oldroot=/tmp/oldroot/ /tmp/,
|
||||||
|
|
||||||
owner / r,
|
owner / r,
|
||||||
owner /newroot/**/ w,
|
owner /newroot/{,**} w,
|
||||||
owner /newroot/dev/* w,
|
|
||||||
|
|
||||||
owner /tmp/newroot/ w,
|
owner /tmp/newroot/ w,
|
||||||
owner /tmp/oldroot/ w,
|
owner /tmp/oldroot/ w,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue