打开了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=ubject_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=ubject_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=ubject_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=ubject_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
感觉跟这个有关系.有大侠知道怎么回事吗.
多谢多谢.
解决方案 »
- 请问tina linux系统的ARM开发板如何使用glew、glut库吗?
- 虚拟机开不起来
- redhat 5.6 升级python 2.4.3到2.7.15
- 关于定时执行sh脚本的问题
- ubuntu 系统中应用程序被卡住大概一秒的时间
- C语言正则表达式匹配中文
- ubuntu14.04 lts系统会自动连接通过数据线连接电脑并打开热点的iPhone 6s手机的网络
- 关于shell脚本批量读取测试数据文件的数据
- RK3288+RTL8201F-VB-CG网卡芯片,kernel3.10配置问题?
- Linux tree安装
- linux下ascii码的值和Windows下不一样?
- 内核模块下要如何遍历目录?
/system/sepolicy/mls文件中有对于chr_file的控制,你可以先看一下.