1.1 selinux 語法結構
Selinux語法結構
含義:允許
mediaserver
進程對app_data_file
類型的文件(file
),進行rw_file_perms
操作
1.1.1 attribute 和 type的關系
-
type atrribute
位于同一個命名空間,(不能用type attribute
定義相同名字的東西) -
attribute
類似于typegroup
,即type A (attribute)B
,Type A
屬于attribute B
;
2.1 selinux 源碼快速驗證
make sepolicy -j[線程數目]
2.1.1 生成中間文件目錄
out/target/product/xxx/obj/ETC/sepolicy_intermediates
3.1 SELinux 狀態
?enforcing
:強制模式,代表 SELinux
運作中,且已經正確的開始限制 domain/type
了;
?permissive
:寬容模式:代表 SELinux
運作中,不過僅會有警告訊息并不會實際限制 domain/type
的存取。
?disabled
:關閉,SELinux
并沒有實際運作。
3.1.1 查看狀態
getenforce
3.1.2 臨時關閉
setenforce 0