From 614617e0008e68967fa7436451b7653e6c87fc74 Mon Sep 17 00:00:00 2001 From: Quarx2k Date: Tue, 24 Mar 2015 00:20:54 +0600 Subject: [PATCH] More Selinux rules.. Change-Id: I3a85246880809dceec784c8e387cf3530dc192bc --- sepolicy/mpdecision.te | 7 +++++++ sepolicy/sensors.te | 8 ++++++++ sepolicy/thermal-engine.te | 5 +++++ 3 files changed, 20 insertions(+) diff --git a/sepolicy/mpdecision.te b/sepolicy/mpdecision.te index c8accdb..dcc1a34 100644 --- a/sepolicy/mpdecision.te +++ b/sepolicy/mpdecision.te @@ -2,3 +2,10 @@ allow mpdecision socket_device:dir {add_name write}; allow mpdecision socket_device:sock_file { write create setattr }; allow mpdecision thermal_socket:sock_file write; allow mpdecision thermal-engine:unix_stream_socket connectto; +allow mpdecision system_data_file:dir write; +allow mpdecision system_data_file:dir add_name; +allow mpdecision system_data_file:file create; +allow mpdecision system_data_file:file { open append }; + + + diff --git a/sepolicy/sensors.te b/sepolicy/sensors.te index 520c0e0..c269656 100644 --- a/sepolicy/sensors.te +++ b/sepolicy/sensors.te @@ -5,3 +5,11 @@ allow sensors self:capability sys_nice; allow sensors unlabeled:dir search; allow sensors unlabeled:dir { read getattr open }; allow sensors unlabeled:file { read write getattr open }; +allow sensors apk_data_file:dir write; +allow sensors apk_data_file:dir add_name; +allow sensors apk_data_file:dir remove_name; +allow sensors apk_data_file:sock_file setattr; +allow sensors apk_data_file:sock_file unlink; +allow sensors apk_data_file:sock_file write; +allow sensors apk_data_file:sock_file create; + diff --git a/sepolicy/thermal-engine.te b/sepolicy/thermal-engine.te index 86c4dbd..a830a49 100644 --- a/sepolicy/thermal-engine.te +++ b/sepolicy/thermal-engine.te @@ -7,3 +7,8 @@ allow thermal-engine socket_device:sock_file { create setattr }; allow thermal-engine sysfs_usb_supply:dir search; allow thermal-engine sysfs_usb_supply:file r_file_perms; allow thermal-engine thermal_socket:sock_file unlink; +allow thermal-engine sysfs_battery_supply:dir search; +allow thermal-engine sysfs_battery_supply:file read; +allow thermal-engine sysfs_battery_supply:file write; +allow thermal-engine sysfs_battery_supply:file open; +