hidl service的selinux配置"/>
新增一个hidl service的selinux配置
在安卓系统中,当我们新增了一个hidl service,我们应该增加以下几个selinux相关的配置
1
service.te(定义一个service type)
type xxx_service, service_manager_type;
service_contexts(把对应的service定义为这个type)
xxx u:object_r:xxx_service:s0
2
xxx.te(定义资源type,然后定义一些具体的安全配置)
type xxx,coredomain,domain;
#定义xxx,继承于coredomain和domain,将代表某一组进程的域名
type xxx_exec,exec_type,file_type;
#定义xxx_exec,继承于exec_type和file_type,将代表某一资源,继承了执行权限
init_domain_domain(xxx)
#具体安全策略
allow 语句
neverallow 语句
file_contexts(使用刚刚定义的那个type)
/system/bin/xxx u:object_r:xxx_exec:s0
更多推荐
新增一个hidl service的selinux配置
发布评论