mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] security: selinux: allow per-file labeling for cgroupfs
@ 2017-02-09 15:58 Antonio Murdaca
  2017-03-10 20:01 ` Paul Moore
  0 siblings, 1 reply; 10+ messages in thread
From: Antonio Murdaca @ 2017-02-09 15:58 UTC (permalink / raw)
  To: selinux; +Cc: gary.tierney, linux-kernel, dwalsh, pmoore, vgoyal, cgroups

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

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH] security: selinux: allow per-file labeling for cgroupfs
@ 2017-02-09 16:02 Antonio Murdaca
  2017-02-09 16:14 ` Paul Moore
  0 siblings, 1 reply; 10+ messages in thread
From: Antonio Murdaca @ 2017-02-09 16:02 UTC (permalink / raw)
  To: selinux
  Cc: gary.tierney, linux-kernel, dwalsh, pmoore, vgoyal, cgroups,
	Antonio Murdaca

From: Antonio Murdaca <runcom@redhat.com>

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 <amurdaca@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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-08-22 19:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-09 15:58 [PATCH] security: selinux: allow per-file labeling for cgroupfs Antonio Murdaca
2017-03-10 20:01 ` Paul Moore
2017-03-10 20:17   ` Stephen Smalley
2017-03-10 20:21     ` Paul Moore
2017-08-22 19:47       ` Paul Moore
2017-02-09 16:02 Antonio Murdaca
2017-02-09 16:14 ` Paul Moore
     [not found]   ` <CALKLTGTc7U7ohxd44MHOuzVomW-oUsumqUqr0MKaUohw1NpSsg@mail.gmail.com>
2017-02-09 19:23     ` Paul Moore
     [not found]       ` <CALKLTGTjpBYd5-M9RiO-Q4H_SokEiPJYptbxktg_aPccws59Jw@mail.gmail.com>
2017-02-09 23:04         ` Paul Moore
2017-02-10 23:05           ` Daniel J Walsh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome