【发布时间】:2017-08-08 10:50:15
【问题描述】:
我的音频 HAL 中有一个 unix 套接字守护程序,我需要从我的应用程序连接到它。
我收到 SELinux denied 日志如下:
08-08 10:38:01.939 2622-2622/com.xxx.xxx.xxx W/ksetsdk.xxx: type=1400 audit(0.0:511): avc: denied { connectto } for path=0023xxx scontext=u:r:system_app:s0 tcontext=u:r:audioserver:s0 tclass=unix_stream_socket permissive=0
即使我的应用使用平台密钥签名、安装在 system.img 中并作为系统运行,也会打印此内容:
root@hikey:/ # ps | grep xxx
system 2619 1893 1561788 86956 SyS_epoll_ 0000000000 S com.xxx.xxx.xxx
root@hikey:/ # ps -Z | grep xxx
u:r:system_app:s0 system 2619 1893 1561788 86736 SyS_epoll_ 0000000000 S com.xxx.xxx.xxx
root@hikey:/ #
我添加了 SEPolicy 如下:
auditallow system_app audioserver:unix_stream_socket { ioctl read getattr write setattr lock append bind connect getopt setopt shutdown connectto };
谁能指导我我错过了什么? AOSP SEPolicy 中是否有任何与此相矛盾的规则?如何让它工作?
【问题讨论】:
标签: android android-source selinux