All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add interface to allow relabeling of iso 9660 filesystems.
@ 2019-03-05 22:32 Sugar, David
  2019-03-06  8:20 ` Dominick Grift
  2019-03-07 23:55 ` Chris PeBenito
  0 siblings, 2 replies; 4+ messages in thread
From: Sugar, David @ 2019-03-05 22:32 UTC (permalink / raw)
  To: selinux-refpolicy@vger.kernel.org

I have a case where I'm labeling media with my own types to control
access.  But that is requiring that I relabel from iso9660_t to my
own type.  This interface allows that relabel.

type=AVC msg=audit(1551621984.372:919): avc:  denied  { relabelfrom } for  pid=9717 comm="mount" scontext=staff_u:staff_r:mymedia_sudo_t:s0-s0:c0.c1023 tcontext=system_u:object_r:iso9660_t:s0 tclass=filesystem permissive=0

Signed-off-by: Dave Sugar <dsugar@tresys.com>
---
 policy/modules/kernel/filesystem.if | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/policy/modules/kernel/filesystem.if b/policy/modules/kernel/filesystem.if
index 048b9d65..a22cb6ba 100644
--- a/policy/modules/kernel/filesystem.if
+++ b/policy/modules/kernel/filesystem.if
@@ -2505,6 +2505,25 @@ interface(`fs_remount_iso9660_fs',`
 	allow $1 iso9660_t:filesystem remount;
 ')
 
+########################################
+## <summary>
+##	Allow changing of the label of a
+##	filesystem with iso9660 type
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`fs_relabelfrom_iso9660_fs',`
+	gen_require(`
+		type iso9660_t;
+	')
+
+	allow $1 iso9660_t:filesystem relabelfrom;
+')
+
 ########################################
 ## <summary>
 ##	Unmount an iso9660 filesystem, which
-- 
2.20.1


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

end of thread, other threads:[~2019-03-08  0:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-05 22:32 [PATCH] Add interface to allow relabeling of iso 9660 filesystems Sugar, David
2019-03-06  8:20 ` Dominick Grift
2019-03-06 14:18   ` Sugar, David
2019-03-07 23:55 ` Chris PeBenito

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.