aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sepolicy/file.te4
-rw-r--r--sepolicy/file_contexts4
-rw-r--r--sepolicy/system_server.te5
3 files changed, 13 insertions, 0 deletions
diff --git a/sepolicy/file.te b/sepolicy/file.te
index 54cc974..0039865 100644
--- a/sepolicy/file.te
+++ b/sepolicy/file.te
@@ -4,3 +4,7 @@ type sysfs_fpc_irq, sysfs_type, fs_type;
type sysfs_fpc_proximity, sysfs_type, fs_type;
type sysfs_fpc_utouch_disable, fs_type, sysfs_type;
type thermal_data_file, data_file_type, file_type;
+
+# /vendor
+type idc_file, file_type, vendor_file_type;
+type keylayout_file, file_type, vendor_file_type;
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index b084443..3b549c0 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -34,3 +34,7 @@
# audio amplifier
/dev/tfa9890 u:object_r:audio_device:s0
+
+# Misc files on /vendor
+/vendor/usr/idc(/.*)? u:object_r:idc_file:s0
+/vendor/usr/keylayout(/.*)? u:object_r:keylayout_file:s0
diff --git a/sepolicy/system_server.te b/sepolicy/system_server.te
index ef21160..975336c 100644
--- a/sepolicy/system_server.te
+++ b/sepolicy/system_server.te
@@ -1,3 +1,8 @@
allow system_server alarm_boot_prop:file { read open getattr };
allow system_server persist_file:dir write;
allow system_server sysfs_fpc_utouch_disable:file rw_file_perms;
+
+# /vendor/usr/keylayout
+r_dir_file(system_server, idc_file)
+# /vendor/usr/idc
+r_dir_file(system_server, keylayout_file)