Bo Ye 3ace839be3 [ALPS03825066] Mark file context to fix build fails
Restore the policies accessing files labeled
    as proc_xxx or sysfs_xxx, but there are some
    exceptions for coredomain process, such as
    meta_tst,dump_state,kpoc_charger

MTK-Commit-Id: 7953b5203bb3cac099c3326d330643b4cd73746d

Change-Id: I4b16c09c352891783e837bea370c264966ca6d13
CR-Id: ALPS03825066
Feature: [Android Default] SELinux, SEAndroid, and SE-MTK
2020-01-18 09:29:41 +08:00

46 lines
1.6 KiB
Plaintext

#scp
allow mobile_log_d sysfs_scp:file { open write };
allow mobile_log_d sysfs_scp:dir search;
allow mobile_log_d scp_device:chr_file { read open };
#sspm
allow mobile_log_d sysfs_sspm:file { open write };
allow mobile_log_d sysfs_sspm:dir search;
allow mobile_log_d sspm_device:chr_file { read open };
#data/misc/mblog
typeattribute mobile_log_d data_between_core_and_vendor_violators;
allow mobile_log_d logmisc_data_file:dir { relabelto create_dir_perms };
allow mobile_log_d logmisc_data_file:file create_file_perms;
#data/log_temp
allow mobile_log_d logtemp_data_file:dir { relabelto create_dir_perms };
allow mobile_log_d logtemp_data_file:file create_file_perms;
#data/data_tmpfs_log
allow mobile_log_d data_tmpfs_log_file:dir create_dir_perms;
allow mobile_log_d data_tmpfs_log_file:file create_file_perms;
#ftrace log property
set_prop(mobile_log_d, ftrace_log_prop)
#Dat: 2017/02/14
#Purpose: allow set telephony Sensitive property
set_prop(mobile_log_d, mtk_telephony_sensitive_prop)
# Date: 2016/11/11
# purpose: allow MobileLog to access aee socket
allow mobile_log_d aee_aed:unix_stream_socket connectto;
# purpose: send log to com port
allow mobile_log_d ttyGS_device:chr_file { read write ioctl open };
# purpose: allow mobile_log_d to access persist.meta.connecttype
get_prop(mobile_log_d, meta_connecttype_prop);
# purpose: allow mobile_log_d to create socket
allow mobile_log_d port:tcp_socket { name_connect name_bind };
allow mobile_log_d mobile_log_d:tcp_socket { create connect setopt bind };
allow mobile_log_d mobile_log_d:tcp_socket { bind setopt listen accept read write };
allow mobile_log_d node:tcp_socket node_bind;