selinux 策略使用到的宏

init_daemon_domain linux

init_daemon_domain(httpd_t, httpd_exec_t)

Defines a transition rule that says

Init Scripts executing apps labeled httpd_exec_t should transition to httpd_t.

initrc_t -> httpd_exec_t -> httpd_t安全

 

包含了3條規則app

1 容許 initrc_t 有執行 httpd_exec_t dom

  allow initrc_t httpd_exec_t : file { execute read getattr };進程

2 容許 域 initrc_t 進程轉換到 httpd_tip

  allow initrc_t httpd_t : process transition;get

3  執行文件httpd_exec_t 有到httpd_t 的entrypointit

 allow httpd_t httpd_exec_t : file entrypoint;io

 

而使用selinux refpolicy中宏簡化的規則的書寫, 把重要的邏輯着重在安全的概念上file

 

相似的有

files_config_file

 

在舊版中有些宏不能用

如自定義一個端口

type my_ssdp_port_t;typeattribute my_ssdp_port_t port_type; # 必定要加上這個屬性#不然 semange 不忍 my_ssdp_port_t 類型

相關文章
相關標籤/搜索