Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1577730 > unrolled thread

[PATCH] security: selinux: allow per-file labeling for cgroupfs

Started byAntonio Murdaca <amurdaca@redhat.com>
First post2017-02-09 17:10 +0100
Last post2017-02-09 17:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] security: selinux: allow per-file labeling for cgroupfs Antonio Murdaca <amurdaca@redhat.com> - 2017-02-09 17:10 +0100

#1577730 — [PATCH] security: selinux: allow per-file labeling for cgroupfs

FromAntonio Murdaca <amurdaca@redhat.com>
Date2017-02-09 17:10 +0100
Subject[PATCH] security: selinux: allow per-file labeling for cgroupfs
Message-ID<t8Zsd-8j1-5@gated-at.bofh.it>
This patch allows genfscon per-file labeling for cgroupfs. For instance,
this allows to label the "release_agent" file within each
cgroup mount and limit writes to it.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
---
 security/selinux/hooks.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 9a8f12f..5a3138e 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -808,6 +808,8 @@ static int selinux_set_mnt_opts(struct super_block *sb,
 
 	if (!strcmp(sb->s_type->name, "debugfs") ||
 	    !strcmp(sb->s_type->name, "sysfs") ||
+	    !strcmp(sb->s_type->name, "cgroup") ||
+	    !strcmp(sb->s_type->name, "cgroup2") ||
 	    !strcmp(sb->s_type->name, "pstore"))
 		sbsec->flags |= SE_SBGENFS;
 
-- 
2.9.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web