## Targetd is a service to allow the remote configuration of block device volumes and file systems within dedicated pools ######################################## ## ## Execute targetd_exec_t in the targetd domain. ## ## ## ## Domain allowed to transition. ## ## # interface(`targetd_domtrans',` gen_require(` type targetd_t, targetd_exec_t; ') corecmd_search_bin($1) domtrans_pattern($1, targetd_exec_t, targetd_t) ') ###################################### ## ## Execute targetd in the caller domain. ## ## ## ## Domain allowed access. ## ## # interface(`targetd_exec',` gen_require(` type targetd_exec_t; ') corecmd_search_bin($1) can_exec($1, targetd_exec_t) ') ######################################## ## ## Search targetd conf directories. ## ## ## ## Domain allowed access. ## ## # interface(`targetd_search_conf',` gen_require(` type targetd_etc_rw_t; ') allow $1 targetd_etc_rw_t:dir search_dir_perms; files_search_etc($1) ') ######################################## ## ## Read targetd conf files. ## ## ## ## Domain allowed access. ## ## # interface(`targetd_read_conf_files',` gen_require(` type targetd_etc_rw_t; ') allow $1 targetd_etc_rw_t:dir list_dir_perms; read_files_pattern($1, targetd_etc_rw_t, targetd_etc_rw_t) files_search_etc($1) ') ######################################## ## ## Manage targetd conf files. ## ## ## ## Domain allowed access. ## ## # interface(`targetd_manage_conf_files',` gen_require(` type targetd_etc_rw_t; ') manage_files_pattern($1, targetd_etc_rw_t, targetd_etc_rw_t) files_search_etc($1) ') ######################################## ## ## Execute targetd server in the targetd domain. ## ## ## ## Domain allowed to transition. ## ## # interface(`targetd_systemctl',` gen_require(` type targetd_t; type targetd_unit_file_t; ') systemd_exec_systemctl($1) systemd_read_fifo_file_passwd_run($1) allow $1 targetd_unit_file_t:file read_file_perms; allow $1 targetd_unit_file_t:service manage_service_perms; ps_process_pattern($1, targetd_t) ') ######################################## ## ## All of the rules required to administrate ## an targetd environment ## ## ## ## Domain allowed access. ## ## ## ## ## Role allowed access. ## ## ## # interface(`targetd_admin',` gen_require(` type targetd_t; type targetd_etc_rw_t; type targetd_unit_file_t; ') allow $1 targetd_t:process { signal_perms }; ps_process_pattern($1, targetd_t) tunable_policy(`deny_ptrace',`',` allow $1 targetd_t:process ptrace; ') files_search_etc($1) admin_pattern($1, targetd_etc_rw_t) targetd_systemctl($1) admin_pattern($1, targetd_unit_file_t) allow $1 targetd_unit_file_t:service all_service_perms; optional_policy(` systemd_passwd_agent_exec($1) systemd_read_fifo_file_passwd_run($1) ') ') ###################################### ## ## Transition to targetcli named content ## ## ## ## Domain allowed access. ## ## # interface(`targetcli_filetrans_admin_home_content',` gen_require(` type targetclid_home_t; ') userdom_admin_home_dir_filetrans($1, targetclid_home_t, dir, ".targetcli") ')