SEAndroid包含有三个主要的模块,分别是安全上下文(Security Context)、安全策略(SEAndroid Policy)和安全服务(Security Server)下面对其简介
•安全上下文(Security Context)实际上就是一个附加在对象上的标签(Tag)这个标签实际上就是一个字符串,它由四部分内容组成,分别是SELinux用户、SELinux角色、类型、安全级别,每一个部分都通过一个冒号来分隔,在安全上下文最重要的type
格式为:
“user:role:type:sensitivity”
例子是:
“u:object_r:default_android_service:s0”
•TE语言的完整格式为:
rule_name source_type target_type : object_class perm_set
rule_name :allow、allowaudit、dontaudit、neverallow等。
source_type:主体进程类型,也叫subject,domain。
target_type:客体资源类型 。例如proc代表其后的file所对应的Type。
object_class:它代表能够给subject操作的一类东西,例如File、Dir、socket、process、property、Binder等。
perm_set:在类object_class中所定义的操作的一个子集。
•RD最常用语句是allow语句,例子:
allow netd proc:files write
理解一:允许ne