From 3950d408c8bc3ce9aa27334abd97bf851c8665d4 Mon Sep 17 00:00:00 2001 From: Demon Singur Date: Mon, 8 Apr 2019 09:18:16 +0200 Subject: [PATCH] vince: sepolicy: Allow system server access to keylayouts on vendor --- sepolicy/file.te | 4 ++++ sepolicy/file_contexts | 4 ++++ sepolicy/system_server.te | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/sepolicy/file.te b/sepolicy/file.te index c127344..5bdbf25 100644 --- a/sepolicy/file.te +++ b/sepolicy/file.te @@ -15,6 +15,10 @@ type fingerprint_data_file, data_file_type, file_type; type fingerprint_persist_file, file_type; type sysfs_fpc_dev, sysfs_type, fs_type; +# Input devices +type idc_file, file_type, vendor_file_type; +type keylayout_file, file_type, vendor_file_type; + # Rild type rild_file, file_type, vendor_file_type; diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index b74d635..30eb037 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -23,6 +23,10 @@ # IR /dev/peel_ir u:object_r:lirc_device:s0 +# Input devices +/(vendor|system/vendor)/usr/idc(/.*)? u:object_r:idc_file:s0 +/(vendor|system/vendor)/usr/keylayout(/.*)? u:object_r:keylayout_file:s0 + # Location /data/vendor/location/xtra/socket_hal_xtra u:object_r:location_socket:s0 diff --git a/sepolicy/system_server.te b/sepolicy/system_server.te index 432758f..0be0c2e 100644 --- a/sepolicy/system_server.te +++ b/sepolicy/system_server.te @@ -4,3 +4,7 @@ allow system_server proc_touchpanel:dir search; allow system_server proc_touchpanel:file rw_file_perms; allow system_server sysfs_vibrator:file read; + +# Input devices +r_dir_file(system_server, idc_file); +r_dir_file(system_server, keylayout_file);