From 57e7760c26bb0ab0f1bac732a9cbbf8c39f0ec07 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Thu, 6 Mar 2014 17:19:47 -0800 Subject: [PATCH] Revert "Revert "libcontainer: Use MS_PRIVATE instead of MS_SLAVE"" This reverts commit bd263f5b15b51747e3429179fef7fcb425ccbe4a. Docker-DCO-1.1-Signed-off-by: Michael Crosby (github: crosbymichael) --- libcontainer/nsinit/mount.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcontainer/nsinit/mount.go b/libcontainer/nsinit/mount.go index 0506b99..a97a379 100644 --- a/libcontainer/nsinit/mount.go +++ b/libcontainer/nsinit/mount.go @@ -20,7 +20,7 @@ const defaultMountFlags = syscall.MS_NOEXEC | syscall.MS_NOSUID | syscall.MS_NOD // is no longer in use, the mounts will be removed automatically func setupNewMountNamespace(rootfs, console string, readonly bool) error { // mount as slave so that the new mounts do not propagate to the host - if err := system.Mount("", "/", "", syscall.MS_SLAVE|syscall.MS_REC, ""); err != nil { + if err := system.Mount("", "/", "", syscall.MS_PRIVATE|syscall.MS_REC, ""); err != nil { return fmt.Errorf("mounting / as slave %s", err) } if err := system.Mount(rootfs, rootfs, "bind", syscall.MS_BIND|syscall.MS_REC, ""); err != nil {