## policy for opendnssec ######################################## ## ## Execute opendnssec_exec_t in the opendnssec domain. ## ## ## ## Domain allowed to transition. ## ## # interface(`opendnssec_domtrans',` gen_require(` type opendnssec_t, opendnssec_exec_t; ') corecmd_search_bin($1) domtrans_pattern($1, opendnssec_exec_t, opendnssec_t) ') ###################################### ## ## Execute opendnssec in the caller domain. ## ## ## ## Domain allowed access. ## ## # interface(`opendnssec_exec',` gen_require(` type opendnssec_exec_t; ') corecmd_search_bin($1) can_exec($1, opendnssec_exec_t) ') ######################################## ## ## Read the opendnssec configuration files. ## ## ## ## Domain allowed access. ## ## ## # interface(`opendnssec_read_config',` gen_require(` type opendnssec_conf_t; ') files_search_etc($1) allow $1 opendnssec_conf_t:dir list_dir_perms; allow $1 opendnssec_conf_t:file read_file_perms; ') ######################################## ## ## Read the opendnssec configuration files. ## ## ## ## Domain allowed access. ## ## ## # interface(`opendnssec_manage_config',` gen_require(` type opendnssec_conf_t; ') files_search_etc($1) allow $1 opendnssec_conf_t:dir manage_dir_perms; allow $1 opendnssec_conf_t:file manage_file_perms; ') ######################################## ## ## Allow the specified domain to ## read and write opendnssec /var files. ## ## ## ## Domain allowed access. ## ## # interface(`opendnssec_manage_var_files',` gen_require(` type opendnssec_var_t; ') files_search_var($1) files_search_var_lib($1) manage_files_pattern($1, opendnssec_var_t, opendnssec_var_t) ') ######################################## ## ## Read opendnssec PID files. ## ## ## ## Domain allowed access. ## ## # interface(`opendnssec_read_pid_files',` gen_require(` type opendnssec_var_run_t; ') files_search_pids($1) read_files_pattern($1, opendnssec_var_run_t, opendnssec_var_run_t) ') ######################################## ## ## Execute opendnssec server in the opendnssec domain. ## ## ## ## Domain allowed to transition. ## ## # interface(`opendnssec_systemctl',` gen_require(` type opendnssec_t; type opendnssec_unit_file_t; ') systemd_exec_systemctl($1) systemd_read_fifo_file_passwd_run($1) allow $1 opendnssec_unit_file_t:file read_file_perms; allow $1 opendnssec_unit_file_t:service manage_service_perms; ps_process_pattern($1, opendnssec_t) ') ######################################## ## ## All of the rules required to administrate ## an opendnssec environment ## ## ## ## Domain allowed access. ## ## ## ## ## Role allowed access. ## ## ## # interface(`opendnssec_admin',` gen_require(` type opendnssec_t; type opendnssec_var_run_t; type opendnssec_unit_file_t; ') allow $1 opendnssec_t:process { signal_perms }; ps_process_pattern($1, opendnssec_t) tunable_policy(`deny_ptrace',`',` allow $1 opendnssec_t:process ptrace; ') files_search_pids($1) admin_pattern($1, opendnssec_var_run_t) opendnssec_systemctl($1) admin_pattern($1, opendnssec_unit_file_t) allow $1 opendnssec_unit_file_t:service all_service_perms; optional_policy(` systemd_passwd_agent_exec($1) systemd_read_fifo_file_passwd_run($1) ') ') ######################################## ## ## Transition to quota named content ## ## ## ## Domain allowed access. ## ## # interface(`opendnssec_filetrans_etc_content',` gen_require(` type opendnssec_conf_t; ') files_etc_filetrans($1, opendnssec_conf_t, file) ') ######################################## ## ## Connect to opendnssec over an unix ## stream socket. ## ## ## ## Domain allowed access. ## ## # interface(`opendnssec_stream_connect',` gen_require(` type opendnssec_t, opendnssec_var_run_t; ') files_search_pids($1) stream_connect_pattern($1, opendnssec_var_run_t, opendnssec_var_run_t, opendnssec_t) ')