summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/file.te3
-rw-r--r--common/file_contexts1
-rw-r--r--common/perfd.te6
-rw-r--r--common/rfs_access.te3
-rw-r--r--common/rmt_storage.te9
5 files changed, 18 insertions, 4 deletions
diff --git a/common/file.te b/common/file.te
index 74e5aa87..93955181 100644
--- a/common/file.te
+++ b/common/file.te
@@ -34,6 +34,9 @@ type diag_data_file, file_type, data_file_type;
#file type for restricting proc read by audiod
type proc_audiod, fs_type;
+#file type for irqbalance socket
+type msm_irqbalance_socket, file_type;
+
# Sensor file types
type sensors_socket, file_type;
type sensors_data_file, file_type, data_file_type;
diff --git a/common/file_contexts b/common/file_contexts
index 1f12fab5..74f7aa74 100644
--- a/common/file_contexts
+++ b/common/file_contexts
@@ -89,6 +89,7 @@
/dev/socket/rild2-debug u:object_r:rild_debug_socket:s0
/dev/socket/rild3 u:object_r:rild_socket:s0
/dev/socket/rild3-debug u:object_r:rild_debug_socket:s0
+/dev/socket/msm_irqbalance u:object_r:msm_irqbalance_socket:s0
###################################
# System files
diff --git a/common/perfd.te b/common/perfd.te
index 4cf061c4..6a47ba3f 100644
--- a/common/perfd.te
+++ b/common/perfd.te
@@ -29,3 +29,9 @@ allow perfd proc:file write;
#KTM
allow perfd sysfs_thermal:dir search;
allow perfd sysfs_thermal:file { open write };
+
+#IRQbalancer access
+unix_socket_connect(perfd, msm_irqbalance, msm_irqbalanced);
+
+#Thermal lib access
+unix_socket_connect(perfd, thermal, thermal-engine);
diff --git a/common/rfs_access.te b/common/rfs_access.te
index 27d426ea..b7ab3cca 100644
--- a/common/rfs_access.te
+++ b/common/rfs_access.te
@@ -15,8 +15,7 @@ allow rfs_access self:socket create_socket_perms;
allow rfs_access smem_log_device:chr_file rw_file_perms;
#For Wakelocks
-allow rfs_access self:capability2 block_suspend;
-allow rfs_access sysfs_wake_lock:file w_file_perms;
+wakelock_use(rfs_access)
#To create the folders in /data
allow rfs_access system_data_file:dir create_dir_perms;
diff --git a/common/rmt_storage.te b/common/rmt_storage.te
index 19aea1d0..018f1931 100644
--- a/common/rmt_storage.te
+++ b/common/rmt_storage.te
@@ -11,8 +11,13 @@ allow rmt_storage smem_log_device:chr_file rw_file_perms;
# sys_admin is needed for ioprio_set
allow rmt_storage self:capability { setuid setgid sys_admin dac_override net_raw setpcap };
-allow rmt_storage self:capability2 block_suspend;
+#For set the ctl properties
+unix_socket_connect(rmt_storage, property, init)
+allow rmt_storage ctl_default_prop:property_service set;
+
+#For Wakelocks
+wakelock_use(rmt_storage)
+
allow rmt_storage self:socket create_socket_perms;
-allow rmt_storage sysfs_wake_lock:file w_file_perms;
allow rmt_storage uio_device:chr_file rw_file_perms;
allow rmt_storage mmc_block_device:blk_file r_file_perms; \ No newline at end of file