X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fnspawn.c;h=a1ed425f05818ab970d262447e467ad71ac63351;hb=f975e971accc4d50c73ae53167db3df7a7099cf2;hp=8f3cd749e525ebb7a854994ad7d30c8b5b43ff0c;hpb=576a01c873a79e9183292d434ec0b18af8cd36cf;p=elogind.git diff --git a/src/nspawn.c b/src/nspawn.c index 8f3cd749e..a1ed425f0 100644 --- a/src/nspawn.c +++ b/src/nspawn.c @@ -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 */ @@ -133,8 +133,8 @@ static int mount_all(const char *dest) { { "/dev/pts", "/dev/pts", "bind", NULL, MS_BIND, true }, { "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV, true }, #ifdef HAVE_SELINUX - { "/selinux", "/selinux", "bind", NULL, MS_BIND, false }, /* Bind mount first */ - { "/selinux", "/selinux", "bind", NULL, MS_BIND|MS_RDONLY|MS_REMOUNT, false }, /* Then, make it r/o */ + { "/sys/fs/selinux", "/sys/fs/selinux", "bind", NULL, MS_BIND, false }, /* Bind mount first */ + { "/sys/fs/selinux", "/sys/fs/selinux", "bind", NULL, MS_BIND|MS_RDONLY|MS_REMOUNT, false }, /* Then, make it r/o */ #endif };