mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
Merge pull request #53 from marineam/fixns
fix(enter_chroot): Limit sharing system mount sharing
This commit is contained in:
commit
31bab93688
@ -242,6 +242,12 @@ setup_env() {
|
||||
|
||||
debug "Mounting chroot environment."
|
||||
MOUNT_CACHE=$(echo $(awk '{print $2}' /proc/mounts))
|
||||
|
||||
# The cros_sdk script created a new filesystem namespace but the system
|
||||
# default (namely on systemd hosts) may be for everything to be shared.
|
||||
# Using 'slave' means we see global changes but cannot change global state.
|
||||
mount --make-rslave /
|
||||
|
||||
setup_mount none "-t proc" /proc
|
||||
setup_mount none "-t sysfs" /sys
|
||||
setup_mount /dev "--bind" /dev
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user