From 140305db6d1a47e57df891a9aa5b04afca69ef6c Mon Sep 17 00:00:00 2001 From: Diogo Ferreira Date: Mon, 23 Nov 2015 13:57:01 +0000 Subject: [PATCH] sepolicy: qcom: Allow reading PSU sysfs by system_server BatteryService queries the usb state to check whether the usb type is HVDCP. This patch adds a rule to allow that. For more context check BatteryService#Led#isHvdcpPresent. Change-Id: Ifacf13dde4b1df81c92bf5d92196e504e61dd402 --- sepolicy/qcom/system_server.te | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sepolicy/qcom/system_server.te b/sepolicy/qcom/system_server.te index 362bd4f4..3239c2dc 100644 --- a/sepolicy/qcom/system_server.te +++ b/sepolicy/qcom/system_server.te @@ -4,3 +4,7 @@ allow system_server mm-pp-daemon:unix_stream_socket connectto; # Time services allow system_server time_daemon:unix_stream_socket connectto; + +#allow reading of usb sysfs to query hvdcp state +allow system_server sysfs_usb_supply:dir { search }; +allow system_server sysfs_usb_supply:file r_file_perms;