nspawn: mount a new /proc instance in the container so that we don't see the hosts' PID tree

This partially reverts f5c1b9eeb9.
This commit is contained in:
Lennart Poettering 2011-07-23 15:54:52 +02:00
parent e1ea662c33
commit 4b7a6af440

View file

@ -124,7 +124,7 @@ static int mount_all(const char *dest) {
} MountPoint;
static const MountPoint mount_table[] = {
{ "/proc", "/proc", "bind", NULL, MS_BIND, true },
{ "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
{ "/proc/sys", "/proc/sys", "bind", NULL, MS_BIND, true }, /* Bind mount first */
{ "/proc/sys", "/proc/sys", "bind", NULL, MS_BIND|MS_RDONLY|MS_REMOUNT, true }, /* Then, make it r/o */
{ "/sys", "/sys", "bind", NULL, MS_BIND, true }, /* Bind mount first */