summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormtk07742 <yongjun.luo@mediatek.com>2019-10-11 15:37:39 +0800
committerYongjun Luo <yongjun.luo@mediatek.com>2019-10-14 17:23:57 +0800
commit7c7249f4597a69f068100da07e2773962c0bdba7 (patch)
treec9226b4a8867a4218cb72f52d83e5a4e637b3f7d
parentc762a93f7586279bf5d9e7f76b3aab12a20acac3 (diff)
downloaddevice_mediatek_wembley-sepolicy-7c7249f4597a69f068100da07e2773962c0bdba7.tar.gz
device_mediatek_wembley-sepolicy-7c7249f4597a69f068100da07e2773962c0bdba7.tar.bz2
device_mediatek_wembley-sepolicy-7c7249f4597a69f068100da07e2773962c0bdba7.zip
[ALPS04821191] Add rules in system_server
Add rules for proc_wlan_status and sysfs_pages_shared and sysfs_pages_sharing and sysfs_pages_unshared and sysfs_pages_volatile. Change-Id: I6a3d7823295fd19b934ac0a28bef1f14ca8de2fa CR-Id: ALPS04821191 Feature: [Module]SystemServer
-rw-r--r--non_plat/file.te11
-rw-r--r--non_plat/genfs_contexts11
-rw-r--r--non_plat/system_server.te13
3 files changed, 34 insertions, 1 deletions
diff --git a/non_plat/file.te b/non_plat/file.te
index 73479f7..2b13fb0 100644
--- a/non_plat/file.te
+++ b/non_plat/file.te
@@ -413,3 +413,14 @@ type sysfs_pftch_qos, fs_type, sysfs_type;
# Date : WK19.38
# Purpose: Android Migration for video codec driver
type sysfs_device_tree_model, fs_type, sysfs_type;
+
+# Date : 2019/10/11
+# Purpose : allow system_server to access /proc/wlan/status for Q Migration
+type proc_wlan_status, fs_type, proc_type;
+
+# Date : 2019/10/11
+# Purpose : allow system_server to access /sys/kernel/mm/ksm/pages_xxx
+type sysfs_pages_shared, fs_type, sysfs_type;
+type sysfs_pages_sharing, fs_type, sysfs_type;
+type sysfs_pages_unshared, fs_type, sysfs_type;
+type sysfs_pages_volatile, fs_type, sysfs_type;
diff --git a/non_plat/genfs_contexts b/non_plat/genfs_contexts
index 6bdae85..b10d6ec 100644
--- a/non_plat/genfs_contexts
+++ b/non_plat/genfs_contexts
@@ -249,3 +249,14 @@ genfscon sysfs /module/pftch_qos u:object_r:sysfs_pftch_qos:s0
# Date : WK19.38
# Purpose: Android Migration for video codec driver
genfscon sysfs /firmware/devicetree/base/model u:object_r:sysfs_device_tree_model:s0
+
+# Date : 2019/10/11
+# Purpose : allow system_server to access /proc/wlan/status for Q Migration
+genfscon proc /wlan/status u:object_r:proc_wlan_status:s0
+
+# Date : 2019/10/11
+# Purpose : allow system_server to access /sys/kernel/mm/ksm/pages_xxx
+genfscon sysfs /kernel/mm/ksm/pages_shared u:object_r:sysfs_pages_shared:s0
+genfscon sysfs /kernel/mm/ksm/pages_sharing u:object_r:sysfs_pages_sharing:s0
+genfscon sysfs /kernel/mm/ksm/pages_unshared u:object_r:sysfs_pages_unshared:s0
+genfscon sysfs /kernel/mm/ksm/pages_volatile u:object_r:sysfs_pages_volatile:s0
diff --git a/non_plat/system_server.te b/non_plat/system_server.te
index 6ab1d0a..a402675 100644
--- a/non_plat/system_server.te
+++ b/non_plat/system_server.te
@@ -234,4 +234,15 @@ allow system_server proc_thermal:dir search;
allow system_server proc_atf_log:dir search;
allow system_server proc_cpufreq:dir search;
allow system_server proc_mtkcooler:dir search;
-allow system_server proc_ppm:dir search; \ No newline at end of file
+allow system_server proc_ppm:dir search;
+
+# Date : 2019/10/11
+# Operation : Q Migration
+allow system_server proc_wlan_status:file getattr;
+
+# Date : 2019/10/11
+# Operation : Q Migration
+allow system_server sysfs_pages_shared:file r_file_perms;
+allow system_server sysfs_pages_sharing:file r_file_perms;
+allow system_server sysfs_pages_unshared:file r_file_perms;
+allow system_server sysfs_pages_volatile:file r_file_perms;