From 3fdd2033dc12e5bc10f0690b3755600e4dc47a35 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Tue, 15 Dec 2015 16:40:00 -0800 Subject: [PATCH] enter_chroot: fix chroot root bind command Commit 09851b84 didn't do a recursive bind by mistake, so if the host system has anything mounted under the chroot directory for some reason the bind would hide those mounts. Recursive ensures existing mounts remain exposed as they did before. --- sdk_lib/enter_chroot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk_lib/enter_chroot.sh b/sdk_lib/enter_chroot.sh index b344ee7bd5..2f4b0f2886 100755 --- a/sdk_lib/enter_chroot.sh +++ b/sdk_lib/enter_chroot.sh @@ -218,7 +218,7 @@ setup_env() { # Make sure the new root directory itself is a mount point. Tools like # unshare assume that things like `mount --make-rprivate /` work. - setup_mount "${MOUNTED_PATH}" "--bind" / + setup_mount "${MOUNTED_PATH}" "--rbind" / setup_mount none "-t proc" /proc setup_mount none "-t sysfs" /sys