summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-22 20:39:03 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-24 00:25:04 -0400
commit0ee679580e55b4b7fe6c68bf63d953017c489617 (patch)
tree8f9fa8ac0cf93a01b23e3ea3e7591e6e77fbcbbf
parent2e3ffafcabcd5077c2d96757bd407cde1f88a883 (diff)
systemd: fall back to mounting /sys/fs/cgroup sans xattr
xattrs on cgroup fs were added back in v3.6-rc3-3-g03b1cde. But we support kernels >= 2.6.39, and we should also support kernels compiled w/o xattr support, even if systemd is compiled with xattr support. Fall back to mounting without xattr support. Tested-by: Colin Walters <walters@verbum.org>
-rw-r--r--src/core/mount-setup.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
index 56d358b094..a0fd7a078f 100644
--- a/src/core/mount-setup.c
+++ b/src/core/mount-setup.c
@@ -68,12 +68,6 @@ typedef struct MountPoint {
* other ones we can delay until SELinux and IMA are loaded. */
#define N_EARLY_MOUNT 5
-#ifdef HAVE_XATTR
-# define FS_XATTR_OPT ",xattr"
-#else
-# define FS_XATTR_OPT ""
-#endif
-
static const MountPoint mount_table[] = {
{ "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV,
NULL, MNT_FATAL|MNT_IN_CONTAINER },
@@ -93,7 +87,11 @@ static const MountPoint mount_table[] = {
NULL, MNT_FATAL|MNT_IN_CONTAINER },
{ "tmpfs", "/sys/fs/cgroup", "tmpfs", "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME,
NULL, MNT_IN_CONTAINER },
- { "cgroup", "/sys/fs/cgroup/systemd", "cgroup", "none,name=systemd" FS_XATTR_OPT, MS_NOSUID|MS_NOEXEC|MS_NODEV,
+#ifdef HAVE_XATTR
+ { "cgroup", "/sys/fs/cgroup/systemd", "cgroup", "none,name=systemd,xattr", MS_NOSUID|MS_NOEXEC|MS_NODEV,
+ NULL, MNT_IN_CONTAINER },
+#endif
+ { "cgroup", "/sys/fs/cgroup/systemd", "cgroup", "none,name=systemd", MS_NOSUID|MS_NOEXEC|MS_NODEV,
NULL, MNT_IN_CONTAINER },
{ "pstore", "/sys/fs/pstore", "pstore", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV,
NULL, MNT_NONE },