]> git.proxmox.com Git - mirror_lxc.git/commitdiff
conf: remove extra MS_BIND with sysfs:mixed
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 11 Sep 2018 10:14:04 +0000 (12:14 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 11 Sep 2018 10:15:48 +0000 (12:15 +0200)
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@ubuntu.com>
Cc: Serge Hallyn <serge@hallyn.com>
src/lxc/conf.c

index 52fc49c9182b4e15ca91ee2edc4835f07274a9d6..35f6733cdc957978c151084344e823a7265dc652 100644 (file)
@@ -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 },