cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] security: selinux: allow per-file labeling for cgroupfs
@ 2017-02-09 15:58 Antonio Murdaca
       [not found] ` <20170209155823.22148-1-runcom-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: Antonio Murdaca @ 2017-02-09 15:58 UTC (permalink / raw)
  To: selinux-+05T5uksL2qpZYMLLGbcSA
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	cgroups-u79uwXL29TY76Z2rM5mHXA, vgoyal-H+wXaHxf7aLQT0dZR+AlfA

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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 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

_______________________________________________
Selinux mailing list
Selinux-+05T5uksL2qpZYMLLGbcSA@public.gmane.org
To unsubscribe, send email to Selinux-leave-+05T5uksL2pAGbPMOrvdOA@public.gmane.org
To get help, send an email containing "help" to Selinux-request-+05T5uksL2pAGbPMOrvdOA@public.gmane.org

^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [PATCH] security: selinux: allow per-file labeling for cgroupfs
@ 2017-02-09 16:02 Antonio Murdaca
       [not found] ` <20170209160242.23405-1-amurdaca-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: Antonio Murdaca @ 2017-02-09 16:02 UTC (permalink / raw)
  To: selinux-+05T5uksL2qpZYMLLGbcSA
  Cc: Antonio Murdaca, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	cgroups-u79uwXL29TY76Z2rM5mHXA, vgoyal-H+wXaHxf7aLQT0dZR+AlfA

From: Antonio Murdaca <runcom-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 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

_______________________________________________
Selinux mailing list
Selinux-+05T5uksL2qpZYMLLGbcSA@public.gmane.org
To unsubscribe, send email to Selinux-leave-+05T5uksL2pAGbPMOrvdOA@public.gmane.org
To get help, send an email containing "help" to Selinux-request-+05T5uksL2pAGbPMOrvdOA@public.gmane.org

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

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

Thread overview: 13+ 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
     [not found] ` <20170209155823.22148-1-runcom-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-03-10 20:01   ` Paul Moore
2017-03-10 20:17     ` Stephen Smalley
     [not found]       ` <1489177036.6824.57.camel-+05T5uksL2qpZYMLLGbcSA@public.gmane.org>
2017-03-10 20:21         ` Paul Moore
2017-08-22 19:47           ` Paul Moore
     [not found]             ` <CAHC9VhRiTnsPNoPZNi2aAQfN4va3Kg81QZgxoed6S-8iAFFvPA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-08-22 19:49               ` Antonio Murdaca
  -- strict thread matches above, loose matches on Subject: below --
2017-02-09 16:02 Antonio Murdaca
     [not found] ` <20170209160242.23405-1-amurdaca-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-02-09 16:14   ` Paul Moore
     [not found]     ` <CAHC9VhRFxDuRJHYEuRs7kc4ivgaT=-SxdU-o5Lq7H-O+5JJRxQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-09 17:39       ` Antonio Murdaca
2017-02-09 19:23         ` Paul Moore
     [not found]           ` <CAHC9VhSj4ztDZwxfcuugaD5-OJrBVaJ=TQS=t4=jfL0+ZdbdYQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-09 22:32             ` Antonio Murdaca
     [not found]               ` <CALKLTGTjpBYd5-M9RiO-Q4H_SokEiPJYptbxktg_aPccws59Jw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-09 23:04                 ` Paul Moore
     [not found]                   ` <CAHC9VhTMxN5sqk+BL6f4-V7o3ez=7fMHBWFRAvj+j5iD+VkiMA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
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;
as well as URLs for NNTP newsgroup(s).