From d687ffe4881391c36956b55655d7dd440a843fd0 Mon Sep 17 00:00:00 2001 From: SamarV-121 Date: Thu, 17 Jun 2021 22:01:02 +0530 Subject: [PATCH] universal7885: sepolicy: Address health HAL denials Change-Id: I7a5215175cdba42a8e9c422e138478733d172d26 Signed-off-by: SamarV-121 --- sepolicy/private/file.te | 1 + sepolicy/private/genfs_contexts | 2 ++ sepolicy/private/hal_health.te | 2 ++ sepolicy/private/healthd.te | 2 ++ 4 files changed, 7 insertions(+) create mode 100644 sepolicy/private/hal_health.te create mode 100644 sepolicy/private/healthd.te diff --git a/sepolicy/private/file.te b/sepolicy/private/file.te index 87e3b9e..1b7b650 100644 --- a/sepolicy/private/file.te +++ b/sepolicy/private/file.te @@ -1 +1,2 @@ +type sysfs_battery, sysfs_type, fs_type; type sysfs_sec_tsp, fs_type, sysfs_type; diff --git a/sepolicy/private/genfs_contexts b/sepolicy/private/genfs_contexts index 7f325dd..3862275 100644 --- a/sepolicy/private/genfs_contexts +++ b/sepolicy/private/genfs_contexts @@ -1 +1,3 @@ genfscon sysfs /devices/virtual/sec/tsp u:object_r:sysfs_sec_tsp:s0 +genfscon sysfs /devices/platform/13840000.i2c/i2c-10/10-003d/s2mu004-charger/power_supply/s2mu004-charger u:object_r:sysfs_battery:s0 +genfscon sysfs /devices/platform/13830000.i2c/i2c-9/9-003b/power_supply/s2mu004-fuelgauge u:object_r:sysfs_battery:s0 diff --git a/sepolicy/private/hal_health.te b/sepolicy/private/hal_health.te new file mode 100644 index 0000000..a490637 --- /dev/null +++ b/sepolicy/private/hal_health.te @@ -0,0 +1,2 @@ +allow hal_health sysfs_battery:file rw_file_perms; +allow hal_health sysfs_battery:dir r_dir_perms; diff --git a/sepolicy/private/healthd.te b/sepolicy/private/healthd.te new file mode 100644 index 0000000..025429f --- /dev/null +++ b/sepolicy/private/healthd.te @@ -0,0 +1,2 @@ +allow healthd sysfs_battery:file rw_file_perms; +allow healthd sysfs_battery:dir r_dir_perms;