繁体   English   中英

SELinux Unix Socket权限被拒绝。 怎么修?

[英]SELinux Unix Socket permission denied. How to fix?

我已经修改了bluedroid以包含一个小的unix套接字服务器。

当客户端启动时,我发现SElinux不喜欢它,并抛出这个:

05-26 18:01:41.072 6248-6248/? I/com.gps.uclient: type=1400 audit(0.0:20): avc: denied { connectto } for path=00236264726F696468696472617773727663 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:bluetooth:s0 tclass=unix_stream_socket permissive=1

此套接字没有真正的路径。 如何添加SELinux规则以允许此套接字?

更新

像谷歌在这里提到的审计audit2allow

有错误。

gps@gps-HP-ProBook-4540s:~$ audit2allow -i sedeny.txt -p ./andsrc/android-6.0.1_r25/out/target/product/flo/root/sepolicy 
libsepol.policydb_read: policydb version 30 does not match my version range 15-29
libsepol.context_from_record: user u is not defined
libsepol.context_from_record: could not create context structure
libsepol.context_from_string: could not create context structure
libsepol.sepol_context_to_sid: could not convert u:r:untrusted_app:s0:c512,c768 to sid

我在SELinux上没有真正的经验,所以我几乎被困在这里。

错误是:

policydb version 30 does not match my version...

此错误是由与apt-get一起安装的audit2allow生成的。 它通过使用AOSP中的audit2allow来解决。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM