Drop legacy device types.
powervr_device is obsoleted by the more general gpu_device.
akm_device and accelerometer_device are obsoleted by the more
general sensors_device.
We could also drop the file_contexts entries altogether and
take them to device-specific policy (in this case, they all
came from crespo, so that is obsolete for master).
Change-Id: I63cef43b0d66bc99b80b64655416cc050f443e7d
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
diff --git a/device.te b/device.te
index 5d3ba9c..bbbec28 100644
--- a/device.te
+++ b/device.te
@@ -1,7 +1,5 @@
# Device types
type device, dev_type, fs_type;
-type akm_device, dev_type;
-type accelerometer_device, dev_type;
type alarm_device, dev_type, mlstrustedobject;
type adb_device, dev_type;
type ashmem_device, dev_type, mlstrustedobject;
@@ -27,7 +25,6 @@
type mtd_device, dev_type;
type mtp_device, dev_type, mlstrustedobject;
type nfc_device, dev_type;
-type powervr_device, dev_type, mlstrustedobject;
type ptmx_device, dev_type, mlstrustedobject;
type qemu_device, dev_type;
type kmsg_device, dev_type;
diff --git a/domain.te b/domain.te
index 75dbe7c..c8063f7 100644
--- a/domain.te
+++ b/domain.te
@@ -51,7 +51,6 @@
allow domain ashmem_device:chr_file rw_file_perms;
allow domain binder_device:chr_file rw_file_perms;
allow domain ptmx_device:chr_file rw_file_perms;
-allow domain powervr_device:chr_file rw_file_perms;
allow domain log_device:dir search;
allow domain log_device:chr_file rw_file_perms;
allow domain alarm_device:chr_file r_file_perms;
diff --git a/file_contexts b/file_contexts
index 42b783f..d2d9949 100644
--- a/file_contexts
+++ b/file_contexts
@@ -29,8 +29,8 @@
# Devices
#
/dev(/.*)? u:object_r:device:s0
-/dev/akm8973.* u:object_r:akm_device:s0
-/dev/accelerometer u:object_r:accelerometer_device:s0
+/dev/akm8973.* u:object_r:sensors_device:s0
+/dev/accelerometer u:object_r:sensors_device:s0
/dev/alarm u:object_r:alarm_device:s0
/dev/android_adb.* u:object_r:adb_device:s0
/dev/ashmem u:object_r:ashmem_device:s0
@@ -64,7 +64,7 @@
/dev/pn544 u:object_r:nfc_device:s0
/dev/ppp u:object_r:ppp_device:s0
/dev/ptmx u:object_r:ptmx_device:s0
-/dev/pvrsrvkm u:object_r:powervr_device:s0
+/dev/pvrsrvkm u:object_r:gpu_device:s0
/dev/qemu_.* u:object_r:qemu_device:s0
/dev/kmsg u:object_r:kmsg_device:s0
/dev/null u:object_r:null_device:s0