diff options
author | Darren Hsu <darrenhsu@google.com> | 2022-07-28 10:16:55 +0800 |
---|---|---|
committer | Darren Hsu <darrenhsu@google.com> | 2022-07-28 15:48:41 +0800 |
commit | 4e2b651fdccffb369ad937258dec6a3486a11e2e (patch) | |
tree | d9c52343e242e5ec4f32f02f27f31eb4d69e907e | |
parent | 0c59021e5887202fbfa7305f8ed9d22e48733101 (diff) | |
download | lynx-sepolicy-4e2b651fdccffb369ad937258dec6a3486a11e2e.tar.gz |
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>
-rw-r--r-- | vendor/genfs_contexts | 3 | ||||
-rw-r--r-- | vendor/hal_power_stats_default.te | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/vendor/genfs_contexts b/vendor/genfs_contexts index dd1b196..4f547fd 100644 --- a/vendor/genfs_contexts +++ b/vendor/genfs_contexts @@ -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 diff --git a/vendor/hal_power_stats_default.te b/vendor/hal_power_stats_default.te new file mode 100644 index 0000000..24527f9 --- /dev/null +++ b/vendor/hal_power_stats_default.te @@ -0,0 +1,2 @@ +# Needed to detect wifi on/off +get_prop(hal_power_stats_default, wifi_hal_prop) |