Chris PeBenito 7c8fc3
Chris PeBenito 141cff
policy_module(dhcp,1.1.1)
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
########################################
Chris PeBenito 7c8fc3
#
Chris PeBenito 7c8fc3
# Declarations
Chris PeBenito 7c8fc3
#
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
type dhcpd_t;
Chris PeBenito 7c8fc3
type dhcpd_exec_t;
Chris PeBenito 7c8fc3
init_daemon_domain(dhcpd_t,dhcpd_exec_t)
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
type dhcpd_state_t;
Chris PeBenito 7c8fc3
files_type(dhcpd_state_t)
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
type dhcpd_tmp_t;
Chris PeBenito 7c8fc3
files_tmp_file(dhcpd_tmp_t)
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
type dhcpd_var_run_t;
Chris PeBenito 7c8fc3
files_pid_file(dhcpd_var_run_t)
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
########################################
Chris PeBenito 7c8fc3
#
Chris PeBenito 7c8fc3
# Local policy
Chris PeBenito 7c8fc3
#
Chris PeBenito 7c8fc3
Chris PeBenito 7b90f2
allow dhcpd_t self:capability net_raw;
Chris PeBenito 7b90f2
dontaudit dhcpd_t self:capability { net_admin sys_tty_config };
Chris PeBenito 681c9a
allow dhcpd_t self:process signal_perms;
Chris PeBenito 7c8fc3
allow dhcpd_t self:fifo_file { read write getattr };
Chris PeBenito 7c8fc3
allow dhcpd_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 7c8fc3
allow dhcpd_t self:unix_stream_socket create_socket_perms;
Chris PeBenito 7c8fc3
allow dhcpd_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito 7c8fc3
allow dhcpd_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 7c8fc3
allow dhcpd_t self:udp_socket create_socket_perms;
Chris PeBenito 7c8fc3
# Allow dhcpd_t to use packet sockets
Chris PeBenito 7c8fc3
allow dhcpd_t self:packet_socket create_socket_perms;
Chris PeBenito 7c8fc3
allow dhcpd_t self:rawip_socket create_socket_perms;
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
can_exec(dhcpd_t,dhcpd_exec_t)
Chris PeBenito 7c8fc3
Chris PeBenito 7b90f2
allow dhcpd_t dhcpd_state_t:dir rw_dir_perms;
Chris PeBenito 7c8fc3
allow dhcpd_t dhcpd_state_t:file create_file_perms;
Chris PeBenito 1c1ac6
sysnet_dhcp_state_filetrans(dhcpd_t,dhcpd_state_t,file)
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
allow dhcpd_t dhcpd_tmp_t:dir create_dir_perms;
Chris PeBenito 7c8fc3
allow dhcpd_t dhcpd_tmp_t:file create_file_perms;
Chris PeBenito 103fe2
files_tmp_filetrans(dhcpd_t, dhcpd_tmp_t, { file dir })
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
allow dhcpd_t dhcpd_var_run_t:file create_file_perms;
Chris PeBenito 33acca
allow dhcpd_t dhcpd_var_run_t:dir rw_dir_perms;
Chris PeBenito 1c1ac6
files_pid_filetrans(dhcpd_t,dhcpd_var_run_t,file)
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
kernel_read_system_state(dhcpd_t)
Chris PeBenito 445522
kernel_read_kernel_sysctls(dhcpd_t)
Chris PeBenito 7c8fc3
Chris PeBenito 141cff
corenet_non_ipsec_sendrecv(dhcpd_t)
Chris PeBenito 7c8fc3
corenet_tcp_sendrecv_all_if(dhcpd_t)
Chris PeBenito 7c8fc3
corenet_udp_sendrecv_all_if(dhcpd_t)
Chris PeBenito 7c8fc3
corenet_raw_sendrecv_all_if(dhcpd_t)
Chris PeBenito 7c8fc3
corenet_tcp_sendrecv_all_nodes(dhcpd_t)
Chris PeBenito 7c8fc3
corenet_udp_sendrecv_all_nodes(dhcpd_t)
Chris PeBenito 7c8fc3
corenet_raw_sendrecv_all_nodes(dhcpd_t)
Chris PeBenito 7c8fc3
corenet_tcp_sendrecv_all_ports(dhcpd_t)
Chris PeBenito 7c8fc3
corenet_udp_sendrecv_all_ports(dhcpd_t)
Chris PeBenito 7c8fc3
corenet_tcp_bind_all_nodes(dhcpd_t)
Chris PeBenito 7c8fc3
corenet_udp_bind_all_nodes(dhcpd_t)
Chris PeBenito 77f6e2
corenet_tcp_bind_dhcpd_port(dhcpd_t)
Chris PeBenito 7c8fc3
corenet_udp_bind_dhcpd_port(dhcpd_t)
Chris PeBenito 7c8fc3
corenet_udp_bind_pxe_port(dhcpd_t)
Chris PeBenito a08248
corenet_tcp_connect_all_ports(dhcpd_t)
Chris PeBenito 141cff
corenet_sendrecv_dhcpd_server_packets(dhcpd_t)
Chris PeBenito 141cff
corenet_sendrecv_pxe_server_packets(dhcpd_t)
Chris PeBenito 141cff
corenet_sendrecv_all_client_packets(dhcpd_t)
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
dev_read_sysfs(dhcpd_t)
Chris PeBenito 7c8fc3
dev_read_rand(dhcpd_t)
Chris PeBenito 7c8fc3
dev_read_urand(dhcpd_t)
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
fs_getattr_all_fs(dhcpd_t)
Chris PeBenito 7c8fc3
fs_search_auto_mountpoints(dhcpd_t)
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
term_dontaudit_use_console(dhcpd_t)
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
corecmd_exec_bin(dhcpd_t)
Chris PeBenito 7c8fc3
corecmd_exec_sbin(dhcpd_t)
Chris PeBenito 7c8fc3
Chris PeBenito 15722e
domain_use_interactive_fds(dhcpd_t)
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
files_read_etc_files(dhcpd_t)
Chris PeBenito 7c8fc3
files_read_usr_files(dhcpd_t)
Chris PeBenito 7c8fc3
files_read_etc_runtime_files(dhcpd_t)
Chris PeBenito 7c8fc3
files_search_var_lib(dhcpd_t)
Chris PeBenito 7c8fc3
Chris PeBenito 1c1ac6
init_use_fds(dhcpd_t)
Chris PeBenito 1815ba
init_use_script_ptys(dhcpd_t)
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
libs_use_ld_so(dhcpd_t)
Chris PeBenito 7c8fc3
libs_use_shared_libs(dhcpd_t)
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
logging_send_syslog_msg(dhcpd_t)
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
miscfiles_read_localization(dhcpd_t)
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
sysnet_read_config(dhcpd_t)
Chris PeBenito 7c8fc3
sysnet_read_dhcp_config(dhcpd_t)
Chris PeBenito 7c8fc3
Chris PeBenito 15722e
userdom_dontaudit_use_unpriv_user_fds(dhcpd_t)
Chris PeBenito 103fe2
userdom_dontaudit_search_sysadm_home_dirs(dhcpd_t)
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
ifdef(`distro_gentoo',`
Chris PeBenito 7c8fc3
	allow dhcpd_t self:capability { chown dac_override setgid setuid sys_chroot };
Chris PeBenito 7c8fc3
')
Chris PeBenito 7c8fc3
Chris PeBenito 7c8fc3
ifdef(`targeted_policy',`
Chris PeBenito 1815ba
	term_dontaudit_use_unallocated_ttys(dhcpd_t)
Chris PeBenito 1815ba
	term_dontaudit_use_generic_ptys(dhcpd_t)
Chris PeBenito 9e04f5
	files_dontaudit_read_root_files(dhcpd_t)
Chris PeBenito 7c8fc3
')
Chris PeBenito 7c8fc3
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 7c8fc3
	# used for dynamic DNS
Chris PeBenito 7c8fc3
	bind_read_dnssec_keys(dhcpd_t)
Chris PeBenito 7c8fc3
')
Chris PeBenito 7c8fc3
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 7c8fc3
	mount_send_nfs_client_request(dhcpd_t)
Chris PeBenito 7c8fc3
')
Chris PeBenito 7c8fc3
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 7c8fc3
	nis_use_ypbind(dhcpd_t)
Chris PeBenito 7c8fc3
')
Chris PeBenito 7c8fc3
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 1815ba
	nscd_socket_use(dhcpd_t)
Chris PeBenito a08248
')
Chris PeBenito a08248
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 7c8fc3
	seutil_sigchld_newrole(dhcpd_t)
Chris PeBenito 7c8fc3
')
Chris PeBenito 7c8fc3
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 7c8fc3
	udev_read_db(dhcpd_t)
Chris PeBenito 7c8fc3
')