比如为platform_app 添加读取fifo_file的权限
allow platform_app camera_data_file:fifo_file { w_file_perms getattr write setattr };
测试发现,在配置 allow platform_app camera_data_file:fifo_file { w_file_perms getattr write setattr }; 后,没有生效,这时候就是Mutil-Level Security(MLS)机制导致的操作被denied了。
在vendor/platform_app.te文件首行加上:
typeattribute platform_app mlstrustedsubject;