sepolicy: allow hal_power_stats to read wifi sysfs and property

avc: denied { read } for name="power_stats" dev="sysfs"
ino=114517 scontext=u:r:hal_power_stats_default:s0
tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

avc: denied { read } for name="u:object_r:wifi_hal_prop:s0"
dev="tmpfs" ino=371 scontext=u:r:hal_power_stats_default:s0
tcontext=u:object_r:wifi_hal_prop:s0 tclass=file permissive=0

Bug: 240391946
Test: get bugreport and make sure no avc denials related to
Test: hal_power_stats
Change-Id: I3be32eb4e61926c3abd24c67e7dab9b4056bf00a
Signed-off-by: Darren Hsu <darrenhsu@google.com>
This commit is contained in:
Darren Hsu
2022-07-28 10:16:55 +08:00
parent 0c59021e58
commit 4e2b651fdc
2 changed files with 5 additions and 0 deletions

View File

@@ -14,3 +14,6 @@ genfscon sysfs /devices/platform/10da0000.hsi2c/i2c-6/i2c-p9222/power_supply/wir
genfscon sysfs /devices/platform/10da0000.hsi2c/i2c-6/i2c-p9222/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/14520000.pcie/pci0001:00/0001:00:00.0/0001:01:00.0/mhi0/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/qcom,cnss-qca6490/wakeup u:object_r:sysfs_wakeup:s0
# PowerStats
genfscon sysfs /kernel/wifi/power_stats u:object_r:sysfs_power_stats:s0

2
vendor/hal_power_stats_default.te vendored Normal file
View File

@@ -0,0 +1,2 @@
# Needed to detect wifi on/off
get_prop(hal_power_stats_default, wifi_hal_prop)