Bug 741238 - v4l2 media controller device node unknown to SELinux
Summary: v4l2 media controller device node unknown to SELinux
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-26 11:08 UTC by Dominick Grift
Modified: 2011-09-26 14:19 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-26 14:19:55 UTC


Attachments (Terms of Use)

Description Dominick Grift 2011-09-26 11:08:29 UTC
Description of problem:
/dev/media[0-9] are currently labeled device_t

Version-Release number of selected component (if applicable):
any

From 083fd70a7a270511ffa625e9b8860885e8768bfd Mon, 26 Sep 2011 13:04:12 +0200
From: Dominick Grift <dominick.grift@gmail.com>
Date: Mon, 26 Sep 2011 12:54:12 +0200
Subject: [PATCH] v4l2 media controller:

http://linuxtv.org/downloads/presentations/summit_jun_2010/20100614-v4l2_summit-media.pdf

Signed-off-by: Dominick Grift <dominick.grift@gmail.com>

diff --git a/policy/modules/kernel/devices.fc b/policy/modules/kernel/devices.fc
index a9038b9..def5425 100644
--- a/policy/modules/kernel/devices.fc
+++ b/policy/modules/kernel/devices.fc
@@ -61,6 +61,7 @@
 /dev/loop-control	-c	gen_context(system_u:object_r:loop_control_device_t,s0)
 /dev/lp.*		-c	gen_context(system_u:object_r:printer_device_t,s0)
 /dev/mcelog		-c	gen_context(system_u:object_r:kmsg_device_t,mls_systemhigh)
+/dev/media.*	-c	gen_context(system_u:object_r:v4l_device_t,s0)
 /dev/mem		-c	gen_context(system_u:object_r:memory_device_t,mls_systemhigh)
 /dev/mergemem		-c	gen_context(system_u:object_r:memory_device_t,mls_systemhigh)
 /dev/mga_vid.*		-c	gen_context(system_u:object_r:xserver_misc_device_t,s0)
diff --git a/policy/modules/kernel/devices.if b/policy/modules/kernel/devices.if
index 2429787..0d5528a 100644
--- a/policy/modules/kernel/devices.if
+++ b/policy/modules/kernel/devices.if
@@ -5701,6 +5701,16 @@
 	filetrans_pattern($1, device_t, vmware_device_t, chr_file, "vmnet7")
 	filetrans_pattern($1, device_t, vmware_device_t, chr_file, "vmnet8")
 	filetrans_pattern($1, device_t, vmware_device_t, chr_file, "vmnet9")
+	filetrans_pattern($1, device_t, v4l_device_t, chr_file, "media0")
+	filetrans_pattern($1, device_t, v4l_device_t, chr_file, "media1")
+	filetrans_pattern($1, device_t, v4l_device_t, chr_file, "media2")
+	filetrans_pattern($1, device_t, v4l_device_t, chr_file, "media3")
+	filetrans_pattern($1, device_t, v4l_device_t, chr_file, "media4")
+	filetrans_pattern($1, device_t, v4l_device_t, chr_file, "media5")
+	filetrans_pattern($1, device_t, v4l_device_t, chr_file, "media6")
+	filetrans_pattern($1, device_t, v4l_device_t, chr_file, "media7")
+	filetrans_pattern($1, device_t, v4l_device_t, chr_file, "media8")
+	filetrans_pattern($1, device_t, v4l_device_t, chr_file, "media9")
 	filetrans_pattern($1, device_t, v4l_device_t, chr_file, "video0")
 	filetrans_pattern($1, device_t, v4l_device_t, chr_file, "video1")
 	filetrans_pattern($1, device_t, v4l_device_t, chr_file, "video2")

Comment 1 Miroslav Grepl 2011-09-26 13:44:15 UTC
Could you push the patch?


Note You need to log in before you can comment on or make changes to this bug.