Chris PeBenito ab58ad
#DESC arpwatch -  keep track of ethernet/ip address pairings
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Author:  Dan Walsh <dwalsh@redhat.com>
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
Chris PeBenito ab58ad
#################################
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Rules for the arpwatch_t domain.
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# arpwatch_exec_t is the type of the arpwatch executable.
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
daemon_domain(arpwatch, `, privmail')
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# for files created by arpwatch
Chris PeBenito ab58ad
type arpwatch_data_t, file_type, sysadmfile;
Chris PeBenito ab58ad
create_dir_file(arpwatch_t,arpwatch_data_t)
Chris PeBenito ab58ad
tmp_domain(arpwatch)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
allow arpwatch_t self:capability { net_admin net_raw setgid setuid };
Chris PeBenito ab58ad
Chris PeBenito ab58ad
can_network_server(arpwatch_t)
Chris PeBenito ab58ad
allow arpwatch_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito ab58ad
allow arpwatch_t self:udp_socket create_socket_perms;
Chris PeBenito ab58ad
allow arpwatch_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito ab58ad
allow arpwatch_t self:packet_socket create_socket_perms;
Chris PeBenito ab58ad
allow arpwatch_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
allow arpwatch_t { sbin_t var_lib_t }:dir search;
Chris PeBenito ab58ad
allow arpwatch_t sbin_t:lnk_file read;
Chris PeBenito ab58ad
r_dir_file(arpwatch_t, etc_t)
Chris PeBenito ab58ad
r_dir_file(arpwatch_t, usr_t)
Chris PeBenito ab58ad
can_ypbind(arpwatch_t)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
ifdef(`qmail.te', `
Chris PeBenito ab58ad
allow arpwatch_t bin_t:dir search;
Chris PeBenito ab58ad
')
Chris PeBenito ab58ad
Chris PeBenito ab58ad
ifdef(`distro_gentoo', `
Chris PeBenito ab58ad
allow initrc_t arpwatch_data_t:dir { add_name write };
Chris PeBenito ab58ad
allow initrc_t arpwatch_data_t:file create;
Chris PeBenito ab58ad
')dnl end distro_gentoo
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# why is mail delivered to a directory of type arpwatch_data_t?
Chris PeBenito ab58ad
allow mta_delivery_agent arpwatch_data_t:dir search;
Chris PeBenito ab58ad
allow { system_mail_t mta_user_agent } arpwatch_tmp_t:file rw_file_perms;
Chris PeBenito ab58ad
ifdef(`hide_broken_symptoms', `
Chris PeBenito ab58ad
dontaudit { system_mail_t mta_user_agent } arpwatch_t:packet_socket { read write };
Chris PeBenito ab58ad
')