報錯模板:
avc: denied { read write getattr } for pid=3944 comm="handsetpowerlib" name="xxxx" dev="tmpfs" ino=5545 scontext=u:r:AAA:s0:c512,c768 tcontext=u:object_r:BBB:s0 tclass=CCC permissive=1
資訊提取:
主體:AAA
客體:BBB
客體類別:CCC
需要allow的權限:read write getattr
修改策略:
1、增加主體新型別(如果不存在)te檔案
devices/vendorxxx/sepolicy/common/下新增AAA.te:
type AAA, domain,mlstrustedsubject; #mlstrustedsubject看情況決定是否添加
type AAA_exec, exec_type,,file_type;
init_daemon_domain(AAA)
allow AAA BBB:CCC { read write getattr };
allow .....; #添加其他avc:denied
2、修改file_contexts
devices/vendorxxx/sepolicy/common/file_contexts新增:
/.../AAA u:object_r:AAA_exec:s0 #/.../AAA為AAA的絕對路徑
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/263853.html
標籤:其他
