From 9afa8ed2209874ef33adde33abd7bd0478e56a8f Mon Sep 17 00:00:00 2001 From: Archilis Wang Date: Sat, 18 Jan 2020 09:38:17 +0800 Subject: [PATCH] [ALPS03885737] Correct agps sepolicy Adjust the policy for sdcard MTK-Commit-Id: 40655afcc8e97b13642f5164987134d506579680 Change-Id: I338ea9b4b6b452b3e59230e692a7ff1850a63c6d CR-Id: ALPS03885737 Feature: A-GPS --- non_plat/file_contexts | 2 +- non_plat/mtk_agpsd.te | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/non_plat/file_contexts b/non_plat/file_contexts index c54bbee..d5c4cd1 100644 --- a/non_plat/file_contexts +++ b/non_plat/file_contexts @@ -21,7 +21,7 @@ #/data/misc/mddb(/.*)? u:object_r:mddb_data_file:s0 /data/aee_exp(/.*)? u:object_r:aee_exp_data_file:s0 /data/vendor/mtklog/aee_exp(/.*)? u:object_r:aee_exp_vendor_file:s0 -#/data/agps_supl(/.*)? u:object_r:agpsd_data_file:s0 +/data/vendor/agps_supl(/.*)? u:object_r:agpsd_data_file:s0 #/data/mnl_flp(/.*)? u:object_r:mnld_data_file:s0 #/data/mnl_gfc(/.*)? u:object_r:mnld_data_file:s0 #/data/misc/gps(/.*)? u:object_r:gps_data_file:s0 diff --git a/non_plat/mtk_agpsd.te b/non_plat/mtk_agpsd.te index 3c8dec2..19b7f4d 100644 --- a/non_plat/mtk_agpsd.te +++ b/non_plat/mtk_agpsd.te @@ -32,11 +32,9 @@ allow mtk_agpsd mnt_user_file:dir create_dir_perms; # Access symbolic link files like /etc and /sdcard allow mtk_agpsd tmpfs:lnk_file create_file_perms; -allow mtk_agpsd storage_file:lnk_file create_file_perms; allow mtk_agpsd mnt_user_file:lnk_file create_file_perms; -typeattribute mtk_agpsd data_between_core_and_vendor_violators; -allow mtk_agpsd media_rw_data_file:dir { search write add_name read open }; -allow mtk_agpsd media_rw_data_file:file { create open append read getattr }; +allow mtk_agpsd storage_file:dir create_dir_perms; +allow mtk_agpsd storage_file:file create_file_perms; # Send supl profile configuration to SLPD (to get SUPL Reference Location for HW Fused Location) allow mtk_agpsd slpd:unix_dgram_socket sendto;