- 論壇徽章:
- 0
|
打開了SELINUX后,開機(jī)過程中l(wèi)og如下:
[ 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分析,應(yīng)該給予untrusted_app一個(gè)write權(quán)限.
所以我在external/sepolicy/untrusted_app.te中增加了下面這句:
allow untrusted_app device:chr_file write;
然后重編驗(yàn)證,還是報(bào)這個(gè)錯(cuò)誤.其他的selinxu錯(cuò)誤都不在出現(xiàn)了,就這句出現(xiàn).
分析上面的log發(fā)現(xiàn),
scontext=u:r:untrusted_app:s0:c512,c768
上面這句有不一樣的地方,
一般的selinux錯(cuò)誤,scontext由4個(gè)部分組成,最后一個(gè)部分是s0,但是這里的log后i名還有c512,c768
感覺跟這個(gè)有關(guān)系.
有大俠知道怎么回事嗎.
多謝多謝. |
|