Add sepolicy for dual_batt_gauge power supply

10-30 04:38:39.556   814   814 I auditd  : type=1400 audit(0.0:13): avc:  denied  { getattr } for  comm="android.hardwar" path="/sys/devices/platform/google,dual_batt_gauge/power_supply/dualbatt/type" dev="sysfs" ino=77177 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
10-30 04:38:39.556   814   814 I auditd  : type=1400 audit(0.0:11): avc:  denied  { read } for  comm="android.hardwar" name="type" dev="sysfs" ino=77177 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1
10-30 04:38:39.556   814   814 I auditd  : type=1400 audit(0.0:12): avc:  denied  { open } for  comm="android.hardwar" path="/sys/devices/platform/google,dual_batt_gauge/power_supply/dualbatt/type" dev="sysfs" ino=77177 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=1

Bug: 308380763
Test: reboot device and check the avc
Change-Id: Ie39f9df23c4041ac442599d85279b69638a514d2
Signed-off-by: Jack Wu <wjack@google.com>
This commit is contained in:
Jack Wu 2023-10-31 11:37:25 +08:00
parent 57ed6e5523
commit 018f7619cc

View file

@ -19,10 +19,12 @@ genfscon sysfs /devices/platform/19450000.drmdsim/19450000.drmdsim.0/error_count
# Battery
genfscon sysfs /devices/platform/10ca0000.hsi2c/i2c-10/10-0036/power_supply u:object_r:sysfs_batteryinfo:s0
genfscon sysfs /devices/platform/10ca0000.hsi2c/i2c-10/10-0061/power_supply u:object_r:sysfs_batteryinfo:s0
genfscon sysfs /devices/platform/google,dual_batt_gauge/power_supply u:object_r:sysfs_batteryinfo:s0
# wake up nodes
genfscon sysfs /devices/platform/10ca0000.hsi2c/i2c-10/10-0061/power/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/10ca0000.hsi2c/i2c-10/10-0061/power_supply/wireless/power/wakeup u:object_r:sysfs_wakeup:s0
genfscon sysfs /devices/platform/google,dual_batt_gauge/power_supply/dualbatt/wakeup u:object_r:sysfs_wakeup:s0
# WLC
genfscon sysfs /devices/platform/10ca0000.hsi2c/i2c-10/10-0061 u:object_r:sysfs_wlc:s0