## Layer 2 Tunneling Protocol daemons. ######################################## ## ## Transition to l2tpd. ## ## ## ## Domain allowed to transition. ## ## # interface(`l2tpd_domtrans',` gen_require(` type l2tpd_t, l2tpd_exec_t; ') corecmd_search_bin($1) domtrans_pattern($1, l2tpd_exec_t, l2tpd_t) ') ######################################## ## ## Execute l2tpd server in the l2tpd domain. ## ## ## ## Domain allowed access. ## ## # interface(`l2tpd_initrc_domtrans',` gen_require(` type l2tpd_initrc_exec_t; ') init_labeled_script_domtrans($1, l2tpd_initrc_exec_t) ') ######################################## ## ## Send to l2tpd via a unix dgram socket. ## ## ## ## Domain allowed access. ## ## # interface(`l2tpd_dgram_send',` gen_require(` type l2tpd_t, l2tpd_tmp_t, l2tpd_var_run_t; ') files_search_tmp($1) dgram_send_pattern($1, { l2tpd_tmp_t l2tpd_var_run_t }, { l2tpd_tmp_t l2tpd_var_run_t }, l2tpd_t) ') ######################################## ## ## Read and write l2tpd sockets. ## ## ## ## Domain allowed access. ## ## # interface(`l2tpd_rw_socket',` gen_require(` type l2tpd_t; ') allow $1 l2tpd_t:socket rw_socket_perms; ') ######################################## ## ## Read l2tpd PID files. ## ## ## ## Domain allowed access. ## ## # interface(`l2tpd_read_pid_files',` gen_require(` type l2tpd_var_run_t; ') files_search_pids($1) allow $1 l2tpd_var_run_t:file read_file_perms; ') ##################################### ## ## Connect to l2tpd over a unix domain ## stream socket. ## ## ## ## Domain allowed access. ## ## # interface(`l2tpd_stream_connect',` gen_require(` type l2tpd_t, l2tpd_var_run_t, l2tpd_tmp_t; ') files_search_pids($1) stream_connect_pattern($1, l2tpd_tmp_t, l2tpd_tmp_t, l2tpd_t) stream_connect_pattern($1, l2tpd_var_run_t, l2tpd_var_run_t, l2tpd_t) ') ######################################## ## ## Read and write l2tpd unnamed pipes. ## ## ## ## Domain allowed access. ## ## # interface(`l2tpd_rw_pipes',` gen_require(` type l2tpd_t; ') allow $1 l2tpd_t:fifo_file rw_fifo_file_perms; ') ######################################## ## ## Allow send a signal to l2tpd. ## ## ## ## Domain allowed access. ## ## # interface(`l2tpd_signal',` gen_require(` type l2tpd_t; ') allow $1 l2tpd_t:process signal; ') ######################################## ## ## Allow send signull to l2tpd. ## ## ## ## Domain allowed access. ## ## # interface(`l2tpd_signull',` gen_require(` type l2tpd_t; ') allow $1 l2tpd_t:process signull; ') ######################################## ## ## Allow send sigkill to l2tpd. ## ## ## ## Domain allowed access. ## ## # interface(`l2tpd_sigkill',` gen_require(` type l2tpd_t; ') allow $1 l2tpd_t:process sigkill; ') ######################################## ## ## Send and receive messages from ## l2tpd over dbus. ## ## ## ## Domain allowed access. ## ## # interface(`l2tpd_dbus_chat',` gen_require(` type l2tpd_t; class dbus send_msg; ') allow $1 l2tpd_t:dbus send_msg; allow l2tpd_t $1:dbus send_msg; ') ######################################## ## ## All of the rules required to administrate ## an l2tpd environment ## ## ## ## Domain allowed access. ## ## ## ## ## Role allowed access. ## ## ## # interface(`l2tpd_admin',` gen_require(` type l2tpd_t, l2tpd_initrc_exec_t, l2tpd_var_run_t; type l2tp_conf_t, l2tpd_tmp_t; ') allow $1 l2tpd_t:process signal_perms; ps_process_pattern($1, l2tpd_t) tunable_policy(`deny_ptrace',`',` allow $1 l2tpd_t:process ptrace; ') l2tpd_initrc_domtrans($1) domain_system_change_exemption($1) role_transition $2 l2tpd_initrc_exec_t system_r; allow $2 system_r; files_search_etc($1) admin_pattern($1, l2tp_conf_t) files_search_pids($1) admin_pattern($1, l2tpd_var_run_t) files_search_tmp($1) admin_pattern($1, l2tpd_tmp_t) ') ######################################## ## ## Read and write to l2tpd unix ## sockets. ## ## ## ## Domain allowed access. ## ## # interface(`l2tpd_rw_pppox_sockets',` gen_require(` type l2tpd_t; ') allow $1 l2tpd_t:pppox_socket rw_socket_perms; ')