diff --git a/non_plat/emdlogger.te b/non_plat/emdlogger.te index 1f8f15c..b7f7dbb 100644 --- a/non_plat/emdlogger.te +++ b/non_plat/emdlogger.te @@ -61,6 +61,9 @@ allow emdlogger sysfs_boot_mode:file { read open }; allow emdlogger sysfs_ccci:dir search; allow emdlogger sysfs_ccci:file r_file_perms; +allow emdlogger sysfs_mdinfo:file r_file_perms; +allow emdlogger sysfs_mdinfo:dir search; + # Allow read avc: denied { read } for name="mddb" dev="mmcblk0p25" ino=681 # scontext=u:r:emdlogger:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0 allow emdlogger system_file:dir read; diff --git a/non_plat/file.te b/non_plat/file.te index acbe0c2..2de65bd 100644 --- a/non_plat/file.te +++ b/non_plat/file.te @@ -74,6 +74,7 @@ type proc_cmdq_debug, fs_type, proc_type; type sysfs_therm, fs_type, sysfs_type; type sysfs_fps, fs_type, sysfs_type; type sysfs_ccci, fs_type, sysfs_type; +type sysfs_mdinfo, fs_type,sysfs_type; type sysfs_ssw, fs_type,sysfs_type; type sysfs_vcorefs_pwrctrl, fs_type, sysfs_type; type sysfs_md32, fs_type, sysfs_type; diff --git a/non_plat/genfs_contexts b/non_plat/genfs_contexts index b3a5448..4e89c7d 100644 --- a/non_plat/genfs_contexts +++ b/non_plat/genfs_contexts @@ -110,3 +110,8 @@ genfscon sysfs /devices/virtual/net u:object_r:sysfs_net:s0 # Date : 2018/11/01 # Purpose : mtk EM c2k bypass read usb file genfscon sysfs /devices/virtual/usb_rawbulk u:object_r:sys_usb_rawbulk:s0 + +#Date : 2018/11/22 +#Purpose: allow mdlogger to read mdinfo file +genfscon sysfs /kernel/md/mdee u:object_r:sysfs_mdinfo:s0 +