########################
# policyd -- core access #
########################
# Configuration files - read
allow policyd_t policyd_conf_t : dir r_dir_perms;
allow policyd_t policyd_conf_t : file r_file_perms;
allow policyd_t policyd_conf_t : lnk_file { getattr read };
# PID file - create, read, and write
allow policyd_t policyd_var_run_t : dir rw_dir_perms;
allow policyd_t policyd_var_run_t : file create_file_perms;
files_pid_filetrans(policyd_t, policyd_var_run_t, file)
# Network access - the policyd daemon is allowed to send
# and receive network data to all nodes and ports over
# all network interfaces (FIXME?). Additionally, it can name_bind
# to the policyd port (policyd_port_t)
allow policyd_t self : tcp_socket create_stream_socket_perms;
corenet_tcp_sendrecv_all_if(policyd_t)
corenet_tcp_sendrecv_all_nodes(policyd_t)
corenet_tcp_sendrecv_all_ports(policyd_t)
corenet_non_ipsec_sendrecv(policyd_t)
corenet_tcp_bind_all_nodes(policyd_t)
#FIXME: corenet_tcp_bind_policyd_port(policyd_t)
sysnet_dns_name_resolve(policyd_t)
# use shared libraries
libs_use_ld_so(policyd_t)
libs_use_shared_libs(policyd_t)
# read common directories / files including
# * /etc (search)
# * system variables
#files_search_etc(policyd_t)
#kernel_read_kernel_sysctls(policyd_t)
#kernel_read_system_state(policyd_t)
#kernel_read_all_sysctls(policyd_t)