- 论坛徽章:
- 0
|
打开了SELINUX后,开机过程中log如下:
[ 48.530560] type=1400 audit(1467283596.977:209): avc: denied { write } for pid=6360 comm="droid.launcher3" name="card0" dev="tmpfs" ino=10259 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u bject_r:device:s0 tclass=chr_file permissive=0
[ 48.573350] type=1400 audit(1467283597.020:210): avc: denied { write } for pid=6313 comm="ndroid.systemui" name="card0" dev="tmpfs" ino=10259 scontext=u:r:platform_app:s0:c512,c768 tcontext=u bject_r:device:s0 tclass=chr_file permissive=0
[ 48.594576] type=1400 audit(1467283597.020:211): avc: denied { write } for pid=6380 comm="RenderThread" name="card0" dev="tmpfs" ino=10259 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u bject_r:device:s0 tclass=chr_file permissive=0
[ 48.742435] type=1400 audit(1467283597.189:212): avc: denied { write } for pid=6386 comm="RenderThread" name="card0" dev="tmpfs" ino=10259 scontext=u:r:platform_app:s0:c512,c768 tcontext=u bject_r:device:s0 tclass=chr_file permissive=0
从上面log分析,应该给予untrusted_app一个write权限.
所以我在external/sepolicy/untrusted_app.te中增加了下面这句:
allow untrusted_app device:chr_file write;
然后重编验证,还是报这个错误.其他的selinxu错误都不在出现了,就这句出现.
分析上面的log发现,
scontext=u:r:untrusted_app:s0:c512,c768
上面这句有不一样的地方,
一般的selinux错误,scontext由4个部分组成,最后一个部分是s0,但是这里的log后i名还有c512,c768
感觉跟这个有关系.
有大侠知道怎么回事吗.
多谢多谢. |
|