mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-11-15 07:54:17 +01:00
feat(abs): improve mount rule for bwrap.
This commit is contained in:
parent
f1b01d03cd
commit
532162f302
@ -13,14 +13,16 @@
|
||||
|
||||
network netlink raw,
|
||||
|
||||
mount options=(rw rbind) /oldroot/{,**/} -> /newroot/{,**/},
|
||||
mount options=(rw silent rprivate) -> /oldroot/,
|
||||
mount options=(rw silent rslave) -> /,
|
||||
mount fstype=devpts options=(rw nosuid noexec) devpts -> /newroot/dev/pts/,
|
||||
mount fstype=tmpfs options=(rw nosuid nodev) tmpfs -> /newroot/dev/,
|
||||
mount fstype=tmpfs options=(rw nosuid nodev) tmpfs -> /tmp/,
|
||||
mount options=(rw rbind) /tmp/newroot/ -> /tmp/newroot/,
|
||||
mount options=(rw rbind) /oldroot/{,**} -> /newroot/{,**},
|
||||
mount options=(rw silent rprivate) -> /oldroot/,
|
||||
mount options=(rw silent rslave) -> /,
|
||||
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 -> /tmp/,
|
||||
|
||||
remount /newroot/{,**/},
|
||||
remount /newroot/{,**},
|
||||
|
||||
umount /,
|
||||
umount /oldroot/,
|
||||
@ -29,8 +31,7 @@
|
||||
pivot_root oldroot=/tmp/oldroot/ /tmp/,
|
||||
|
||||
owner / r,
|
||||
owner /newroot/**/ w,
|
||||
owner /newroot/dev/* w,
|
||||
owner /newroot/{,**} w,
|
||||
|
||||
owner /tmp/newroot/ w,
|
||||
owner /tmp/oldroot/ w,
|
||||
|
Loading…
Reference in New Issue
Block a user