From e076addc59ed8dbf3db715896937322392593f03 Mon Sep 17 00:00:00 2001 From: dybios Date: Tue, 10 Sep 2019 10:19:13 +0530 Subject: [PATCH] Sanders: Fix fsg and rmt sepol Signed-off-by: ronaxdevil --- sepolicy/vendor/file_contexts | 7 +++++++ sepolicy/vendor/rmt_storage.te | 15 +++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index 3ed607c..6ecc24e 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -1,3 +1,10 @@ +/dev/block/platform/soc/7824900.sdhci/mmcblk0p19 u:object_r:modem_efs_partition_device:s0 +/dev/block/platform/soc/7824900.sdhci/mmcblk0p27 u:object_r:modem_efs_partition_device:s0 +/dev/block/platform/soc/7824900.sdhci/mmcblk0p28 u:object_r:modem_efs_partition_device:s0 + +# FSG +/fsg u:object_r:fsg_file:s0 + # ADSP /sys/kernel/aov(/.*)? u:object_r:sysfs_adsp:s0 /data/adspd(/.*)? u:object_r:adspd_data_file:s0 diff --git a/sepolicy/vendor/rmt_storage.te b/sepolicy/vendor/rmt_storage.te index af3475c..3103297 100644 --- a/sepolicy/vendor/rmt_storage.te +++ b/sepolicy/vendor/rmt_storage.te @@ -1,13 +1,24 @@ +allow rmt_storage { + modem_efs_partition_device +}:blk_file rw_file_perms; + +r_dir_file(rmt_storage fsg_file) +r_dir_file(rmt_storage, persist_file) + allow rmt_storage sysfs_rmt_storage:file rw_file_perms; allow rmt_storage sysfs_rmt_storage:dir { search open }; allow rmt_storage sysfs_uio:file r_file_perms; allow rmt_storage sysfs_uio:dir { read open search }; allow rmt_storage sysfs_uio:lnk_file { read }; -allow rmt_storage debugfs_rmt_storage:dir search; -allow rmt_storage debugfs_rmt_storage:file w_file_perms; + +allow rmt_storage debugfs_rmt_storage:dir r_dir_perms; +allow rmt_storage debugfs_rmt_storage:file rw_file_perms; allow rmt_storage fsg_file:file { open read }; allow rmt_storage fsg_file:dir search; allow rmt_storage fsg_file:lnk_file read; allow rmt_storage persist_file:dir r_dir_perms; + +allow rmt_storage vendor_radio_prop:file { getattr open read }; +allow rmt_storage vendor_file:dir search;