From e3b981ef7535aa697e07c1f633884fa719c35039 Mon Sep 17 00:00:00 2001 From: Danny Wood Date: Tue, 25 Jun 2019 11:40:23 +0100 Subject: [PATCH] universal7580: sepolicy: Fix SELinux denials related to the A5 as well as a couple of other universal denials Change-Id: I043c8ed73eb901216d3ee6aa182a6b436000b055 --- sepolicy/genfs_contexts | 11 +++++++++++ sepolicy/hal_fingerprint_default.te | 4 ++++ sepolicy/hal_power_default.te | 1 + 3 files changed, 16 insertions(+) create mode 100644 sepolicy/hal_fingerprint_default.te diff --git a/sepolicy/genfs_contexts b/sepolicy/genfs_contexts index 93895d9..bdbe0a1 100644 --- a/sepolicy/genfs_contexts +++ b/sepolicy/genfs_contexts @@ -29,6 +29,17 @@ genfscon sysfs /devices/13850000.i2c/i2c-10/10-0050/input/input3/enabled u:ob genfscon sysfs /devices/virtual/sec/sec_touchkey/ u:object_r:sysfs_input:s0 genfscon sysfs /devices/virtual/sec/sec_key/ u:object_r:sysfs_input:s0 genfscon sysfs /devices/virtual/sec/tsp/ u:object_r:sysfs_input:s0 +genfscon sysfs /devices/virtual/secgpio_check/ u:object_r:sysfs_input:s0 + +# A5 power supply devices +genfscon sysfs /devices/battery.43/power_supply u:object_r:sysfs_usb_supply:s0 +genfscon sysfs /devices/i2c.42/i2c-7/7-0071/power_supply u:object_r:sysfs_usb_supply:s0 +genfscon sysfs /devices/13890000.hsi2c/i2c-2/2-0049/sm5705-charger/power_supply u:object_r:sysfs_usb_supply:s0 + +# A5 Input devices +genfscon sysfs /devices/13850000.i2c/i2c-10/10-0020/input/input3 u:object_r:sysfs_input:s0 +genfscon sysfs /devices/i2c.20/i2c-4/4-0020/input/input2 u:object_r:sysfs_input:s0 +genfscon sysfs /devices/virtual/fingerprint/fingerprint u:object_r:sysfs_input:s0 # SEC GPIO input devices genfscon sysfs /class/secgpio_check/secgpio_check_all/gpioinit_check u:object_r:sysfs_input:s0 diff --git a/sepolicy/hal_fingerprint_default.te b/sepolicy/hal_fingerprint_default.te new file mode 100644 index 0000000..03a4040 --- /dev/null +++ b/sepolicy/hal_fingerprint_default.te @@ -0,0 +1,4 @@ +# hal_fingerprint_default +allow hal_fingerprint_default sysfs_input:dir search; +allow hal_fingerprint_default sysfs_input:file rw_file_perms; + diff --git a/sepolicy/hal_power_default.te b/sepolicy/hal_power_default.te index 7d68aed..c56c432 100644 --- a/sepolicy/hal_power_default.te +++ b/sepolicy/hal_power_default.te @@ -3,6 +3,7 @@ allow hal_power_default sysfs:dir { open read search }; allow hal_power_default sysfs:file { rw_file_perms }; # Input devices +allow hal_power_default sysfs_input:dir search; allow hal_power_default sysfs_input:file { rw_file_perms }; # CPU devices -- 2.20.1