The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/distrobuilder/pull/295
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Thomas Hipp <thomas.h...@canonical.com>
From 0dc2ee9d9bf6613445f3b69996b45862ce261d12 Mon Sep 17 00:00:00 2001 From: Thomas Hipp <thomas.h...@canonical.com> Date: Tue, 3 Mar 2020 09:15:05 +0100 Subject: [PATCH] chroot: Unmount /dev/fuse Signed-off-by: Thomas Hipp <thomas.h...@canonical.com> --- shared/chroot.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/shared/chroot.go b/shared/chroot.go index e15540e..13b215b 100644 --- a/shared/chroot.go +++ b/shared/chroot.go @@ -58,14 +58,6 @@ func setupMounts(rootfs string, mounts []ChrootMount) error { } } - // Make sure /dev/fuse is read-only - if lxd.PathExists("/dev/fuse") { - err = unix.Mount("", "/dev/fuse", "", unix.MS_REMOUNT|unix.MS_BIND|unix.MS_RDONLY, "") - if err != nil { - return errors.Wrap(err, "Failed to mount '/dev/fuse' read-only") - } - } - return nil } @@ -130,6 +122,14 @@ func moveMounts(mounts []ChrootMount) error { return err } + // Make sure /dev/fuse is unmounted + if lxd.PathExists("/dev/fuse") { + err = unix.Unmount("/dev/fuse", 0) + if err != nil { + return errors.Wrap(err, "Failed to unmount /dev/fuse") + } + } + return nil }
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel