Voucher Key 相关SELinux

来源:互联网 发布:阿里云 域名解析到网址 编辑:程序博客网 时间:2024/04/30 21:45

涉及文件:

device/qcom/sepolicyexternal/sepolicy

/common/file_contexts:给所有的自定义变量(包括文件节点、设备节点、可执行程序)赋了具体的值(保存的是系统中所有文件的安全上下文)

/system/bin/VerifyVouchers          u:object_r:VerifyVouchers_exec:s0

/common/file.te:声明了file_contexts中为文件类型的变量

type VerifyVouchers_exec, exec_type, file_type;

device.te 声明了file_contexts中为设备节点的变量,很多.te文件都是以进程名来命名的。
/common/VerifyVouchers.te:

type VerifyVouchers, domain;init_daemon_domain(VerifyVouchers)allow VerifyVouchers factory_file:dir { search read };allow VerifyVouchers factory_file:file { getattr read open };allow VerifyVouchers property_socket:sock_file { write };allow VerifyVouchers init:unix_stream_socket { connectto };allow VerifyVouchers VerifyVouchers:property_service { set };

/common/property_contexts:保存的是系统中所有属性的安全上下文

atd.voucher.exist          u:object_r:VerifyVouchers:s0atd.voucher.intact         u:object_r:VerifyVouchers:s0

/common/init.te:给需要操作这个节点的进程赋上控制权限

allow init VerifyVouchers_exec:file { getattr read open execute };
0 0