[ALPS03934986] Fix Selinux issue

[Detail]
Command chown system system /mnt/vendor/nvcfg action=post-fs-data (/vendor/etc/init/hw/init.mt6739.rc:138) took 1ms and failed: lchown() failed: Permission denied

[Solution] Add unlabeled permission for vendor_init

MTK-Commit-Id: 511397f101d5d63593199c212888e674e661199d

Change-Id: Ia22badf945b52f76be3176f3081ada35aaada17b
CR-Id: ALPS03934986
Feature: [Android Default] SELinux, SEAndroid, and SE-MTK
This commit is contained in:
Lili Lin 2020-01-18 09:51:11 +08:00
parent 3b302c45bc
commit 98a7fdc4b2
2 changed files with 5 additions and 2 deletions

View File

@ -8,7 +8,7 @@ allow vendor_init mtk_md_version_prop:property_service set;
allow vendor_init mtk_volte_prop:property_service set; allow vendor_init mtk_volte_prop:property_service set;
allow vendor_init usp_prop:property_service set; allow vendor_init usp_prop:property_service set;
allow vendor_init vendor_radio_prop:property_service set; allow vendor_init vendor_radio_prop:property_service set;
allow vendor_init wmt_prop:property_service set;
allow vendor_init proc:file write; allow vendor_init proc:file write;
allow vendor_init proc_bootprof:file write; allow vendor_init proc_bootprof:file write;
@ -16,7 +16,7 @@ allow vendor_init rootfs:dir { write add_name setattr };
allow vendor_init self:capability sys_module; allow vendor_init self:capability sys_module;
allow vendor_init tmpfs:dir { write create add_name }; allow vendor_init tmpfs:dir { write create add_name };
allow vendor_init unlabeled:dir { relabelfrom getattr setattr search };
allow vendor_init vendor_file:system module_load; allow vendor_init vendor_file:system module_load;
allow vendor_init kmsg_device:chr_file unlink; allow vendor_init kmsg_device:chr_file unlink;

View File

@ -10,3 +10,6 @@ allow zygote proc_ged:file {open read write ioctl getattr};
# Purpose: Allow to access gpu for memtrack functions # Purpose: Allow to access gpu for memtrack functions
allow zygote gpu_device:dir search; allow zygote gpu_device:dir search;
allow zygote gpu_device:chr_file { open read write ioctl getattr}; allow zygote gpu_device:chr_file { open read write ioctl getattr};
allow zygote proc_bootprof:file rw_file_perms;
allow zygote proc_uptime:file rw_file_perms;