|
|
1a8e1d9 |
From 3dbd2254c5b7677dc0aa03ce1809f024b8a44788 Mon Sep 17 00:00:00 2001
|
|
|
1a8e1d9 |
From: Kay Sievers <kay@vrfy.org>
|
|
|
1a8e1d9 |
Date: Wed, 11 Apr 2012 22:18:55 +0200
|
|
|
1a8e1d9 |
Subject: [PATCH] enable proper access timestamps on all tmpfs mounts (cherry
|
|
|
1a8e1d9 |
picked from commit
|
|
|
1a8e1d9 |
635f7d8ca723615b4cf968670d58c109b806bb20)
|
|
|
1a8e1d9 |
|
|
|
1a8e1d9 |
Conflicts:
|
|
|
1a8e1d9 |
|
|
|
1a8e1d9 |
src/mount-setup.c
|
|
|
1a8e1d9 |
units/media.mount
|
|
|
1a8e1d9 |
---
|
|
|
1a8e1d9 |
src/mount-setup.c | 8 ++++----
|
|
|
1a8e1d9 |
src/nspawn.c | 4 ++--
|
|
|
1a8e1d9 |
2 files changed, 6 insertions(+), 6 deletions(-)
|
|
|
1a8e1d9 |
|
|
|
1a8e1d9 |
diff --git a/src/mount-setup.c b/src/mount-setup.c
|
|
|
1a8e1d9 |
index 7c14ea8..97ff9df 100644
|
|
|
1a8e1d9 |
--- a/src/mount-setup.c
|
|
|
1a8e1d9 |
+++ b/src/mount-setup.c
|
|
|
1a8e1d9 |
@@ -57,11 +57,11 @@ typedef struct MountPoint {
|
|
|
1a8e1d9 |
static const MountPoint mount_table[] = {
|
|
|
1a8e1d9 |
{ "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
|
|
|
1a8e1d9 |
{ "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
|
|
|
1a8e1d9 |
- { "devtmpfs", "/dev", "devtmpfs", "mode=755", MS_NOSUID, true },
|
|
|
1a8e1d9 |
- { "tmpfs", "/dev/shm", "tmpfs", "mode=1777", MS_NOSUID|MS_NODEV, true },
|
|
|
1a8e1d9 |
+ { "devtmpfs", "/dev", "devtmpfs", "mode=755", MS_NOSUID|MS_STRICTATIME, true },
|
|
|
1a8e1d9 |
+ { "tmpfs", "/dev/shm", "tmpfs", "mode=1777", MS_NOSUID|MS_NODEV|MS_STRICTATIME, true },
|
|
|
1a8e1d9 |
{ "devpts", "/dev/pts", "devpts", "mode=620,gid=" STRINGIFY(TTY_GID), MS_NOSUID|MS_NOEXEC, false },
|
|
|
1a8e1d9 |
- { "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV, true },
|
|
|
1a8e1d9 |
- { "tmpfs", "/sys/fs/cgroup", "tmpfs", "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV, false },
|
|
|
1a8e1d9 |
+ { "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV|MS_STRICTATIME, true },
|
|
|
1a8e1d9 |
+ { "tmpfs", "/sys/fs/cgroup", "tmpfs", "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME, false },
|
|
|
1a8e1d9 |
{ "cgroup", "/sys/fs/cgroup/systemd", "cgroup", "none,name=systemd", MS_NOSUID|MS_NOEXEC|MS_NODEV, false },
|
|
|
1a8e1d9 |
};
|
|
|
1a8e1d9 |
|
|
|
1a8e1d9 |
diff --git a/src/nspawn.c b/src/nspawn.c
|
|
|
1a8e1d9 |
index 97efcd1..73bd18f 100644
|
|
|
1a8e1d9 |
--- a/src/nspawn.c
|
|
|
1a8e1d9 |
+++ b/src/nspawn.c
|
|
|
1a8e1d9 |
@@ -142,9 +142,9 @@ static int mount_all(const char *dest) {
|
|
|
1a8e1d9 |
{ "/proc/sys", "/proc/sys", "bind", NULL, MS_BIND|MS_RDONLY|MS_REMOUNT, true }, /* Then, make it r/o */
|
|
|
1a8e1d9 |
{ "/sys", "/sys", "bind", NULL, MS_BIND, true }, /* Bind mount first */
|
|
|
1a8e1d9 |
{ "/sys", "/sys", "bind", NULL, MS_BIND|MS_RDONLY|MS_REMOUNT, true }, /* Then, make it r/o */
|
|
|
1a8e1d9 |
- { "tmpfs", "/dev", "tmpfs", "mode=755", MS_NOSUID, true },
|
|
|
1a8e1d9 |
+ { "tmpfs", "/dev", "tmpfs", "mode=755", MS_NOSUID|MS_STRICTATIME, true },
|
|
|
1a8e1d9 |
{ "/dev/pts", "/dev/pts", "bind", NULL, MS_BIND, true },
|
|
|
1a8e1d9 |
- { "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV, true },
|
|
|
1a8e1d9 |
+ { "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV|MS_STRICTATIME, true },
|
|
|
1a8e1d9 |
#ifdef HAVE_SELINUX
|
|
|
1a8e1d9 |
{ "/sys/fs/selinux", "/sys/fs/selinux", "bind", NULL, MS_BIND, false }, /* Bind mount first */
|
|
|
1a8e1d9 |
{ "/sys/fs/selinux", "/sys/fs/selinux", "bind", NULL, MS_BIND|MS_RDONLY|MS_REMOUNT, false }, /* Then, make it r/o */
|