From d3f562dea9e5bd1ffa58b0ea6dba1e51ee202a3b Mon Sep 17 00:00:00 2001 From: SamarV-121 Date: Wed, 23 Jun 2021 17:21:36 +0530 Subject: [PATCH] universal7885: sepolicy: Allow health HAL to read otg and muic-manager node * also remove write access Change-Id: Ib89b2a0c4b8e31a12c1f5262d8fd172c1a947b47 Signed-off-by: SamarV-121 --- sepolicy/private/genfs_contexts | 2 ++ sepolicy/private/hal_health.te | 3 +-- sepolicy/private/healthd.te | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sepolicy/private/genfs_contexts b/sepolicy/private/genfs_contexts index d17bd79..f81d103 100644 --- a/sepolicy/private/genfs_contexts +++ b/sepolicy/private/genfs_contexts @@ -1,4 +1,6 @@ genfscon sysfs /devices/virtual/sec/tsp u:object_r:sysfs_sec_tsp:s0 genfscon sysfs /devices/virtual/sec/switch u:object_r:sysfs_sec_switch: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/13840000.i2c/i2c-10/10-003d/s2mu004-charger/power_supply/otg u:object_r:sysfs_battery:s0 +genfscon sysfs /devices/platform/13840000.i2c/i2c-10/10-003d/s2mu004-muic/power_supply/muic-manager 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 index a490637..7338ac5 100644 --- a/sepolicy/private/hal_health.te +++ b/sepolicy/private/hal_health.te @@ -1,2 +1 @@ -allow hal_health sysfs_battery:file rw_file_perms; -allow hal_health sysfs_battery:dir r_dir_perms; +r_dir_file(hal_health, sysfs_battery) diff --git a/sepolicy/private/healthd.te b/sepolicy/private/healthd.te index 025429f..77797fd 100644 --- a/sepolicy/private/healthd.te +++ b/sepolicy/private/healthd.te @@ -1,2 +1 @@ -allow healthd sysfs_battery:file rw_file_perms; -allow healthd sysfs_battery:dir r_dir_perms; +r_dir_file(healthd, sysfs_battery)