From 4fef319c9b9ec2d8a33fee25f918bfd73def98cd Mon Sep 17 00:00:00 2001 From: Juan Rong Date: Sat, 18 Jan 2020 09:58:35 +0800 Subject: [PATCH] [ALPS03951067] EM: selinux for battery [Detail] allow EM access battery info MTK-Commit-Id: cdcee8fe601a984182ded4522acadfe6b70dec66 Change-Id: Ic55a779d3d6883d1dd0828258ff3bf084c8d7706 CR-Id: ALPS03951067 Feature: Fuel Gauge --- non_plat/radio.te | 6 ++++++ plat_private/em_svr.te | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/non_plat/radio.te b/non_plat/radio.te index 634e2de..3c524b9 100644 --- a/non_plat/radio.te +++ b/non_plat/radio.te @@ -202,3 +202,9 @@ set_prop(radio, mtk_bt_sspdebug_prop) # Purpose : For EM access vendor property allow radio vendor_default_prop:file { read getattr open }; +# Date : 2018/06/01 +# Operation : P migration +# Purpose : For EM access battery info +allow radio sysfs_batteryinfo:dir search; +allow radio sysfs_batteryinfo:file { read write getattr open create}; +allow radio sysfs_vbus:file { read getattr open }; diff --git a/plat_private/em_svr.te b/plat_private/em_svr.te index c83aa71..a504d9a 100644 --- a/plat_private/em_svr.te +++ b/plat_private/em_svr.te @@ -66,8 +66,7 @@ allow em_svr sysfs:dir { open read }; # Purpose: battery temprature setting allow em_svr sysfs_batteryinfo:dir search; allow em_svr sysfs_batteryinfo:file { write open }; - - +r_dir_file(em_svr, sysfs_batteryinfo);