Chris PeBenito a5ef55
Chris PeBenito b57785
policy_module(portreserve, 1.1.1)
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
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)
Chris PeBenito a5ef55
files_pid_filetrans(portreserve_t, portreserve_var_run_t, { file sock_file })
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)