From e25bd405a25b7c71ffedabf6923e870587d3ff10 Mon Sep 17 00:00:00 2001 From: Patrick Tjin Date: Wed, 21 Sep 2016 14:34:11 -0700 Subject: Allow shell to access battery info <36>[ 121.324864] type=1400 audit(1474482824.756:42): avc: denied { read } for pid=3613 comm="sh" name="cycle_count" dev="sysfs" ino=17912 scontext=u:r:shell:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 <36>[ 134.823071] type=1400 audit(1474482838.253:43): avc: denied { read } for pid=4067 comm="sh" name="temp" dev="sysfs" ino=17925 scontext=u:r:shell:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0 <36>[ 154.299075] type=1400 audit(1474482857.729:44): avc: denied { read } for pid=4215 comm="sh" name="temp1_input" dev="sysfs" ino=15199 scontext=u:r:shell:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive= Bug: 31653332 Change-Id: I8a4bb0f009033ea61d2feea9c48c8f74378d3be4 --- sepolicy/file_contexts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 993a745d..2f905598 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -156,7 +156,10 @@ # mmi_touch related /sys files /sys/devices/f9966000\.i2c/i2c-1/1-004a(/.*)? u:object_r:sysfs_mmi_touch:s0 -/sys/devices/f9925000\.i2c/i2c-0/0-001c/power_supply/battery/capacity u:object_r:sysfs_batteryinfo:s0 +/sys/devices/f9925000\.i2c/i2c-0/0-001c/power_supply/battery/capacity u:object_r:sysfs_batteryinfo:s0 +/sys/devices/f9925000\.i2c/i2c-0/0-001c/power_supply/battery/cycle_count u:object_r:sysfs_batteryinfo:s0 +/sys/devices/f9925000\.i2c/i2c-0/0-001c/power_supply/battery/temp u:object_r:sysfs_batteryinfo:s0 +/sys/devices/f9964000\.i2c/i2c-8/8-0048/temp1_input u:object_r:sysfs_batteryinfo:s0 # Context for mpdecision /sys/module/msm_thermal/core_control/cpus_offlined u:object_r:sysfs_mpdecision:s0 -- cgit v1.2.3