Chris PeBenito ab58ad
#DESC Ypserv - NIS/YP
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Authors:  Dan Walsh <dwalsh@redhat.com>
Chris PeBenito ab58ad
# Depends: portmap.te
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
Chris PeBenito ab58ad
#################################
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Rules for the ypserv_t domain.
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
daemon_domain(ypserv)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
tmp_domain(ypserv)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Use capabilities.
Chris PeBenito ab58ad
allow ypserv_t self:capability { net_bind_service };
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Use the network.
Chris PeBenito ab58ad
can_network_server(ypserv_t)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
allow ypserv_t self:fifo_file rw_file_perms;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
read_sysctl(ypserv_t)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Send to portmap and initrc.
Chris PeBenito ab58ad
can_udp_send(ypserv_t, portmap_t)
Chris PeBenito ab58ad
can_udp_send(ypserv_t, initrc_t)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
type ypserv_conf_t, file_type, sysadmfile;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Read and write /var/yp.
Chris PeBenito ab58ad
allow ypserv_t var_yp_t:dir rw_dir_perms;
Chris PeBenito ab58ad
allow ypserv_t var_yp_t:file create_file_perms;
Chris PeBenito ab58ad
allow ypserv_t ypserv_conf_t:file { getattr read };
Chris PeBenito ab58ad
allow ypserv_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito ab58ad
allow ypserv_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito ab58ad
ifdef(`rpcd.te', `
Chris PeBenito ab58ad
allow rpcd_t ypserv_conf_t:file { getattr read };
Chris PeBenito ab58ad
')
Chris PeBenito ab58ad
allow ypserv_t reserved_port_t:{ udp_socket tcp_socket } name_bind;
Chris PeBenito ab58ad
dontaudit ypserv_t reserved_port_type:{ tcp_socket udp_socket } name_bind;
Chris PeBenito ab58ad
can_exec(ypserv_t, bin_t)