android selinux权限,Android SeLinux权限问题和解决方法
目标类型”如:在file_contexts中添加:/dev/tfa9890u:object_r:audio_device:s03.4 举例添加权限:在mediaserver.te中添加allow mediaserver device:chr_file { read write open};编译报错:libsepol.check_assertion_helper: neverallow on lin
目标类型”
如:在file_contexts中添加:/dev/tfa9890u:object_r:audio_device:s0
3.4 举例
添加权限:
在mediaserver.te中添加allow mediaserver device:chr_file { read write open};
编译报错:
libsepol.check_assertion_helper: neverallow on line 258 ofexternal/sepolicy/domain.te (or line 5252 of policy.conf) violated byallow mediaserver device:chr_file { read write open};
违反了domain.te 258的:
neverallow {domain –unconfineddomain –ueventd } device:chr_file { open read write}
运行Log:
avc: denied { read write } for pid=303 comm=”mediaserver”name=”tfa9890″ dev=”tmpfs” ino=3880 scontext=u:r:mediaserver:s0 tcontext=u:object_r:device:s0tclass=chr_file permissive=0
修改步骤:
1.目标名称是: tfa9890, 其在系统中的路径是: /dev/tfa9890, 是audio相关的设备文件
2.源类型是mediaserver, 在mediaserver.te 文件中发现其具有 audio_device 目标类型的权限
3.所以在file_contexts 中添加 “/dev/tfa9890 u:object_r:audio_device:s0” 可以解决问题
更多推荐
所有评论(0)