Chris PeBenito ab58ad
#DESC Ypbind - NIS/YP
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Authors:  Stephen Smalley <sds@epoch.ncsc.mil> and Timothy Fraser  
Chris PeBenito ab58ad
#           Russell Coker <russell@coker.com.au>
Chris PeBenito ab58ad
# X-Debian-Packages: nis
Chris PeBenito ab58ad
# Depends: portmap.te named.te
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
Chris PeBenito ab58ad
#################################
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Rules for the ypbind_t domain.
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
daemon_domain(ypbind)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
tmp_domain(ypbind)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Use capabilities.
Chris PeBenito ab58ad
allow ypbind_t self:capability { net_bind_service };
Chris PeBenito ab58ad
dontaudit ypbind_t self:capability net_admin;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Use the network.
Chris PeBenito ab58ad
can_network(ypbind_t)
Chris PeBenito ab58ad
allow ypbind_t port_type:tcp_socket name_connect;
Chris PeBenito ab58ad
allow ypbind_t port_t:{ tcp_socket udp_socket } name_bind;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
allow ypbind_t self:fifo_file rw_file_perms;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
read_sysctl(ypbind_t)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Send to portmap and initrc.
Chris PeBenito ab58ad
can_udp_send(ypbind_t, portmap_t)
Chris PeBenito ab58ad
can_udp_send(ypbind_t, initrc_t)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Read and write /var/yp.
Chris PeBenito ab58ad
allow ypbind_t var_yp_t:dir rw_dir_perms;
Chris PeBenito ab58ad
allow ypbind_t var_yp_t:file create_file_perms;
Chris PeBenito ab58ad
allow initrc_t var_yp_t:dir { getattr read };
Chris PeBenito ab58ad
allow ypbind_t etc_t:file { getattr read };
Chris PeBenito ab58ad
allow ypbind_t self:{ unix_dgram_socket unix_stream_socket } create_socket_perms;
Chris PeBenito ab58ad
allow ypbind_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito ab58ad
allow ypbind_t reserved_port_t:{ tcp_socket udp_socket } name_bind;
Chris PeBenito ab58ad
dontaudit ypbind_t reserved_port_type:{ tcp_socket udp_socket } name_bind;
Chris PeBenito ab58ad
can_udp_send(initrc_t, ypbind_t)
Chris PeBenito ab58ad