From 1cbaa678fed8dcf6403fb0e40dbd6d3edb91eb7e Mon Sep 17 00:00:00 2001 From: mtk33297 Date: Sat, 18 Jan 2020 09:38:07 +0800 Subject: [PATCH] [ALPS02333452] Android p selinux change [Detail] Android has defined neverallow rules to restrict direct access to system files. We need to have a custom label for each policy. [Solution] Define custom label for drmserver MTK-Commit-Id: c84c43b87a6ac2651a0562b8818bc66516e4a50b Change-Id: Ide4fc49628508aee77e67f3213749210430153a3 CR-Id: ALPS02333452 Feature: OMA DRM V1.0 --- plat_private/drmserver.te | 2 +- plat_private/file.te | 6 ++++++ plat_private/file_contexts | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100755 plat_private/file.te diff --git a/plat_private/drmserver.te b/plat_private/drmserver.te index 7c727e8..425240f 100644 --- a/plat_private/drmserver.te +++ b/plat_private/drmserver.te @@ -3,4 +3,4 @@ # ====================== # =======drmserver====== -#allow drmserver sysfs:file { read open }; +allow drmserver access_sys_file:file { read open }; diff --git a/plat_private/file.te b/plat_private/file.te new file mode 100755 index 0000000..e1d7a89 --- /dev/null +++ b/plat_private/file.te @@ -0,0 +1,6 @@ +# ============================================== +# MTK Policy Rule +# ============================================== + +# For drmserver +type access_sys_file, fs_type, sysfs_type; \ No newline at end of file diff --git a/plat_private/file_contexts b/plat_private/file_contexts index a529be8..3e46099 100644 --- a/plat_private/file_contexts +++ b/plat_private/file_contexts @@ -44,3 +44,5 @@ #MTK vibrator /sys/devices/platform/vibrator@0/leds/vibrator(/.*)? u:object_r:sysfs_vibrator:s0 + +/sys/block/mmcblk0rpmb/size u:object_r:access_sys_file:s0