From dd7d5a7038717e450747ce6fcac249de9e86a67a Mon Sep 17 00:00:00 2001 From: Tri Vo <trong@google.com> Date: Tue, 27 Mar 2018 15:05:03 -0700 Subject: [PATCH] Fix aosp healthd. We only need this change for aosp devices. Internal sepolicy for healthd domain is different and does not need this. Addresses this denial: avc: denied { open } for path="/sys/class/power_supply" dev="sysfs" ino=25340 scontext=u:r:healthd:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=1 Test: $OUT/vendor/etc/selinux/precompiled_sepolicy contains the new permission. Change-Id: Ie47c231af800026fd9d8a1f752253bb338768c13 --- public/healthd.te | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/healthd.te b/public/healthd.te index 50952d546..87217d5d7 100644 --- a/public/healthd.te +++ b/public/healthd.te @@ -7,6 +7,8 @@ allow healthd kmsg_device:chr_file rw_file_perms; # Read access to pseudo filesystems. allow healthd sysfs_type:dir search; +# Allow to read /sys/class/power_supply directory. +allow healthd sysfs:dir r_dir_perms; r_dir_file(healthd, rootfs) r_dir_file(healthd, cgroup) -- GitLab