## policy for tlp ######################################## ## ## Execute tlp_exec_t in the tlp domain. ## ## ## ## Domain allowed to transition. ## ## # interface(`tlp_domtrans',` gen_require(` type tlp_t, tlp_exec_t; ') corecmd_search_bin($1) domtrans_pattern($1, tlp_exec_t, tlp_t) ') ###################################### ## ## Execute tlp in the caller domain. ## ## ## ## Domain allowed access. ## ## # interface(`tlp_exec',` gen_require(` type tlp_exec_t; ') corecmd_search_bin($1) can_exec($1, tlp_exec_t) ') ###################################### ## ## Transition to tlp named content ## ## ## ## Domain allowed access. ## ## # interface(`tlp_filetrans_named_content',` gen_require(` type tlp_var_run_t; ') files_pid_filetrans($1, tlp_var_run_t, dir, "tlp") ') ######################################## ## ## Search tlp conf directories. ## ## ## ## Domain allowed access. ## ## # interface(`tlp_search_conf',` gen_require(` type tlp_etc_rw_t; ') allow $1 tlp_etc_rw_t:dir search_dir_perms; files_search_etc($1) ') ######################################## ## ## Read tlp conf files. ## ## ## ## Domain allowed access. ## ## # interface(`tlp_read_conf_files',` gen_require(` type tlp_etc_rw_t; ') allow $1 tlp_etc_rw_t:dir list_dir_perms; read_files_pattern($1, tlp_etc_rw_t, tlp_etc_rw_t) files_search_etc($1) ') ######################################## ## ## Manage tlp conf files. ## ## ## ## Domain allowed access. ## ## # interface(`tlp_manage_conf_files',` gen_require(` type tlp_etc_rw_t; ') manage_files_pattern($1, tlp_etc_rw_t, tlp_etc_rw_t) files_search_etc($1) ') ######################################## ## ## Execute tlp server in the tlp domain. ## ## ## ## Domain allowed to transition. ## ## # interface(`tlp_systemctl',` gen_require(` type tlp_t; type tlp_unit_file_t; ') systemd_exec_systemctl($1) systemd_read_fifo_file_passwd_run($1) allow $1 tlp_unit_file_t:file read_file_perms; allow $1 tlp_unit_file_t:service manage_service_perms; ps_process_pattern($1, tlp_t) ') ######################################## ## ## Manage tlp pid files ## ## ## ## Domain allowed access. ## ## # interface(`tlp_manage_pid_files',` gen_require(` type tlp_var_run_t; ') files_search_pids($1) manage_files_pattern($1, tlp_var_run_t, tlp_var_run_t) ') ######################################## ## ## Create tlp pid directories ## ## ## ## Domain allowed access. ## ## # interface(`tlp_create_pid_dirs',` gen_require(` type tlp_var_run_t; ') files_search_pids($1) create_dirs_pattern($1, tlp_var_run_t, tlp_var_run_t) ') ######################################## ## ## All of the rules required to administrate ## an tlp environment ## ## ## ## Domain allowed access. ## ## ## ## ## Role allowed access. ## ## ## # interface(`tlp_admin',` gen_require(` type tlp_t; type tlp_etc_rw_t; type tlp_unit_file_t; ') allow $1 tlp_t:process { signal_perms }; ps_process_pattern($1, tlp_t) tunable_policy(`deny_ptrace',`',` allow $1 tlp_t:process ptrace; ') files_search_etc($1) admin_pattern($1, tlp_etc_rw_t) tlp_systemctl($1) admin_pattern($1, tlp_unit_file_t) allow $1 tlp_unit_file_t:service all_service_perms; optional_policy(` systemd_passwd_agent_exec($1) systemd_read_fifo_file_passwd_run($1) ') ')