Chris PeBenito 29af4c
policy_module(portreserve, 1.2.0)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
########################################
Chris PeBenito a5ef55
#
Chris PeBenito a5ef55
# Declarations
Chris PeBenito a5ef55
#
Chris PeBenito a5ef55
Chris PeBenito a5ef55
type portreserve_t;
Chris PeBenito a5ef55
type portreserve_exec_t;
Chris PeBenito a5ef55
init_daemon_domain(portreserve_t, portreserve_exec_t)
Chris PeBenito a5ef55
Dan Walsh 3eaa99
type portreserve_initrc_exec_t;
Dan Walsh 3eaa99
init_script_file(portreserve_initrc_exec_t)
Dan Walsh 3eaa99
Chris PeBenito a5ef55
type portreserve_etc_t;
Chris PeBenito a5ef55
files_type(portreserve_etc_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
type portreserve_var_run_t;
Chris PeBenito a5ef55
files_pid_file(portreserve_var_run_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
########################################
Chris PeBenito a5ef55
#
Chris PeBenito a5ef55
# Portreserve local policy
Chris PeBenito a5ef55
#
Chris PeBenito a5ef55
Chris PeBenito b57785
allow portreserve_t self:capability { dac_read_search dac_override };
Chris PeBenito a5ef55
allow portreserve_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito a5ef55
allow portreserve_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito a5ef55
allow portreserve_t self:unix_dgram_socket { create_socket_perms sendto };
Chris PeBenito a5ef55
allow portreserve_t self:tcp_socket create_socket_perms;
Chris PeBenito a5ef55
allow portreserve_t self:udp_socket create_socket_perms;
Chris PeBenito a5ef55
Chris PeBenito a5ef55
# Read etc files
Chris PeBenito a5ef55
list_dirs_pattern(portreserve_t, portreserve_etc_t, portreserve_etc_t)
Chris PeBenito a5ef55
read_files_pattern(portreserve_t, portreserve_etc_t, portreserve_etc_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
# Manage /var/run/portreserve/*
Chris PeBenito a5ef55
manage_dirs_pattern(portreserve_t, portreserve_var_run_t, portreserve_var_run_t)
Chris PeBenito a5ef55
manage_files_pattern(portreserve_t, portreserve_var_run_t, portreserve_var_run_t)
Chris PeBenito a5ef55
manage_sock_files_pattern(portreserve_t, portreserve_var_run_t, portreserve_var_run_t)
Dan Walsh 3eaa99
files_pid_filetrans(portreserve_t, portreserve_var_run_t, { file sock_file dir })
Chris PeBenito a5ef55
Chris PeBenito b57785
corecmd_getattr_bin_files(portreserve_t)
Chris PeBenito b57785
Chris PeBenito 20272c
corenet_all_recvfrom_unlabeled(portreserve_t)
Chris PeBenito 20272c
corenet_all_recvfrom_netlabel(portreserve_t)
Chris PeBenito a5ef55
corenet_tcp_bind_generic_node(portreserve_t)
Chris PeBenito a5ef55
corenet_udp_bind_generic_node(portreserve_t)
Chris PeBenito 20272c
corenet_tcp_bind_all_ports(portreserve_t)
Chris PeBenito 20272c
corenet_udp_bind_all_ports(portreserve_t)
Chris PeBenito a5ef55
Chris PeBenito a5ef55
files_read_etc_files(portreserve_t)
Dan Walsh 3eaa99
Dan Walsh 3eaa99
userdom_dontaudit_search_user_home_content(portreserve_t)