[lxc-devel] [lxc/master] conf: remove extra MS_BIND with sysfs:mixed
brauner on Github
lxc-bot at linuxcontainers.org
Tue Sep 11 10:16:43 UTC 2018
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 528 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180911/d1e844fb/attachment.bin>
-------------- next part --------------
From 51a922baf724689ff3a0df938ca8975601c9c815 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Tue, 11 Sep 2018 12:14:04 +0200
Subject: [PATCH] conf: remove extra MS_BIND with sysfs:mixed
The extra bind-mount is not required. To succesfully remount read-only
we just need MS_REMOUNT|MS_RDONLY.
Closes #2602.
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
Cc: Serge Hallyn <serge at hallyn.com>
---
src/lxc/conf.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index 52fc49c91..35f6733cd 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -694,7 +694,6 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
{ LXC_AUTO_SYS_MASK, LXC_AUTO_SYS_RW, "sysfs", "%r/sys", "sysfs", 0, NULL },
{ LXC_AUTO_SYS_MASK, LXC_AUTO_SYS_RO, "sysfs", "%r/sys", "sysfs", MS_RDONLY, NULL },
{ LXC_AUTO_SYS_MASK, LXC_AUTO_SYS_MIXED, "sysfs", "%r/sys", "sysfs", MS_NODEV|MS_NOEXEC|MS_NOSUID, NULL },
- { LXC_AUTO_SYS_MASK, LXC_AUTO_SYS_MIXED, "%r/sys", "%r/sys", NULL, MS_BIND, NULL },
{ LXC_AUTO_SYS_MASK, LXC_AUTO_SYS_MIXED, NULL, "%r/sys", NULL, MS_REMOUNT|MS_BIND|MS_RDONLY, NULL },
{ LXC_AUTO_SYS_MASK, LXC_AUTO_SYS_MIXED, "sysfs", "%r/sys/devices/virtual/net", "sysfs", 0, NULL },
{ LXC_AUTO_SYS_MASK, LXC_AUTO_SYS_MIXED, "%r/sys/devices/virtual/net/devices/virtual/net", "%r/sys/devices/virtual/net", NULL, MS_BIND, NULL },
More information about the lxc-devel
mailing list