Allow fastbootd to access power_supply, usb nodes.

This change allows fastbootd (for healthd) to access
the power_supply and usb nodes.

Change-Id: Ib5c637b28dd65c6958778b02c3026c90b39fe713
This commit is contained in:
P.Adarsh Reddy
2020-04-03 18:42:12 +05:30
committed by Gerrit - the friendly Code Review server
parent f298f09b1a
commit 822e1e5465
2 changed files with 21 additions and 0 deletions

View File

@@ -36,4 +36,15 @@ allow fastbootd {
vendor_modem_block_device
vendor_mdtp_device
}:blk_file { rw_file_perms };
# Allow fastbootd to read /sys/class/power_supply directory
# and access to power supply, usb nodes.
allow fastbootd sysfs:dir r_dir_perms;
r_dir_file(fastbootd, vendor_sysfs_battery_supply)
r_dir_file(fastbootd, vendor_sysfs_usb_supply)
allow fastbootd {
vendor_sysfs_battery_supply
vendor_sysfs_usb_supply
}:file w_file_perms;
')

View File

@@ -35,6 +35,16 @@ allow fastbootd {
modem_block_device
mdtp_device
}:blk_file { rw_file_perms };
# Allow fastbootd to read /sys/class/power_supply directory
# and access to power supply, usb nodes.
allow fastbootd sysfs:dir r_dir_perms;
r_dir_file(fastbootd, vendor_sysfs_battery_supply)
r_dir_file(fastbootd, vendor_sysfs_usb_supply)
allow fastbootd {
vendor_sysfs_battery_supply
vendor_sysfs_usb_supply
}:file w_file_perms;
')
allow fastbootd tmpfs:lnk_file { getattr read };