## policy for lldpad ######################################## ## ## Transition to lldpad. ## ## ## ## Domain allowed to transition. ## ## # interface(`lldpad_domtrans',` gen_require(` type lldpad_t, lldpad_exec_t; ') corecmd_search_bin($1) domtrans_pattern($1, lldpad_exec_t, lldpad_t) ') ######################################## ## ## Execute lldpad server in the lldpad domain. ## ## ## ## Domain allowed access. ## ## # interface(`lldpad_initrc_domtrans',` gen_require(` type lldpad_initrc_exec_t; ') init_labeled_script_domtrans($1, lldpad_initrc_exec_t) ') ######################################## ## ## Search lldpad lib directories. ## ## ## ## Domain allowed access. ## ## # interface(`lldpad_search_lib',` gen_require(` type lldpad_var_lib_t; ') allow $1 lldpad_var_lib_t:dir search_dir_perms; files_search_var_lib($1) ') ######################################## ## ## Read lldpad lib files. ## ## ## ## Domain allowed access. ## ## # interface(`lldpad_read_lib_files',` gen_require(` type lldpad_var_lib_t; ') files_search_var_lib($1) read_files_pattern($1, lldpad_var_lib_t, lldpad_var_lib_t) ') ######################################## ## ## Manage lldpad lib files. ## ## ## ## Domain allowed access. ## ## # interface(`lldpad_manage_lib_files',` gen_require(` type lldpad_var_lib_t; ') files_search_var_lib($1) manage_files_pattern($1, lldpad_var_lib_t, lldpad_var_lib_t) ') ######################################## ## ## Manage lldpad lib directories. ## ## ## ## Domain allowed access. ## ## # interface(`lldpad_manage_lib_dirs',` gen_require(` type lldpad_var_lib_t; ') files_search_var_lib($1) manage_dirs_pattern($1, lldpad_var_lib_t, lldpad_var_lib_t) ') ######################################## ## ## Read lldpad PID files. ## ## ## ## Domain allowed access. ## ## # interface(`lldpad_read_pid_files',` gen_require(` type lldpad_var_run_t; ') files_search_pids($1) allow $1 lldpad_var_run_t:file read_file_perms; ') ##################################### ## ## Send to a lldpad unix dgram socket. ## ## ## ## Domain allowed access. ## ## # interface(`lldpad_dgram_send',` gen_require(` type lldpad_t; ') allow $1 lldpad_t:unix_dgram_socket sendto; allow lldpad_t $1:unix_dgram_socket sendto; ') ######################################## ## ## All of the rules required to administrate ## an lldpad environment ## ## ## ## Domain allowed access. ## ## ## ## ## Role allowed access. ## ## ## # interface(`lldpad_admin',` gen_require(` type lldpad_t; type lldpad_initrc_exec_t; type lldpad_var_lib_t; type lldpad_var_run_t; ') allow $1 lldpad_t:process signal_perms; ps_process_pattern($1, lldpad_t) tunable_policy(`deny_ptrace',`',` allow $1 lldpad_t:process ptrace; ') lldpad_initrc_domtrans($1) domain_system_change_exemption($1) role_transition $2 lldpad_initrc_exec_t system_r; allow $2 system_r; files_search_var_lib($1) admin_pattern($1, lldpad_var_lib_t) files_search_pids($1) admin_pattern($1, lldpad_var_run_t) ')