2005-09-02 14:52:08 +00:00
|
|
|
|
2006-10-18 19:25:27 +00:00
|
|
|
policy_module(dhcp,1.2.0)
|
2005-09-02 14:52:08 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type dhcpd_t;
|
|
|
|
type dhcpd_exec_t;
|
|
|
|
init_daemon_domain(dhcpd_t,dhcpd_exec_t)
|
|
|
|
|
|
|
|
type dhcpd_state_t;
|
|
|
|
files_type(dhcpd_state_t)
|
|
|
|
|
|
|
|
type dhcpd_tmp_t;
|
|
|
|
files_tmp_file(dhcpd_tmp_t)
|
|
|
|
|
|
|
|
type dhcpd_var_run_t;
|
|
|
|
files_pid_file(dhcpd_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
2005-10-25 17:37:56 +00:00
|
|
|
allow dhcpd_t self:capability net_raw;
|
|
|
|
dontaudit dhcpd_t self:capability { net_admin sys_tty_config };
|
2005-09-22 21:59:50 +00:00
|
|
|
allow dhcpd_t self:process signal_perms;
|
2005-09-02 14:52:08 +00:00
|
|
|
allow dhcpd_t self:fifo_file { read write getattr };
|
|
|
|
allow dhcpd_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow dhcpd_t self:unix_stream_socket create_socket_perms;
|
|
|
|
allow dhcpd_t self:netlink_route_socket r_netlink_socket_perms;
|
|
|
|
allow dhcpd_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
allow dhcpd_t self:udp_socket create_socket_perms;
|
|
|
|
# Allow dhcpd_t to use packet sockets
|
|
|
|
allow dhcpd_t self:packet_socket create_socket_perms;
|
|
|
|
allow dhcpd_t self:rawip_socket create_socket_perms;
|
|
|
|
|
|
|
|
can_exec(dhcpd_t,dhcpd_exec_t)
|
|
|
|
|
2005-10-25 17:37:56 +00:00
|
|
|
allow dhcpd_t dhcpd_state_t:dir rw_dir_perms;
|
2005-09-02 14:52:08 +00:00
|
|
|
allow dhcpd_t dhcpd_state_t:file create_file_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
sysnet_dhcp_state_filetrans(dhcpd_t,dhcpd_state_t,file)
|
2005-09-02 14:52:08 +00:00
|
|
|
|
|
|
|
allow dhcpd_t dhcpd_tmp_t:dir create_dir_perms;
|
|
|
|
allow dhcpd_t dhcpd_tmp_t:file create_file_perms;
|
2006-02-21 18:40:44 +00:00
|
|
|
files_tmp_filetrans(dhcpd_t, dhcpd_tmp_t, { file dir })
|
2005-09-02 14:52:08 +00:00
|
|
|
|
|
|
|
allow dhcpd_t dhcpd_var_run_t:file create_file_perms;
|
2005-10-26 16:00:13 +00:00
|
|
|
allow dhcpd_t dhcpd_var_run_t:dir rw_dir_perms;
|
2006-03-02 23:41:11 +00:00
|
|
|
files_pid_filetrans(dhcpd_t,dhcpd_var_run_t,file)
|
2005-09-02 14:52:08 +00:00
|
|
|
|
|
|
|
kernel_read_system_state(dhcpd_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(dhcpd_t)
|
2005-09-02 14:52:08 +00:00
|
|
|
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_non_ipsec_sendrecv(dhcpd_t)
|
2005-09-02 14:52:08 +00:00
|
|
|
corenet_tcp_sendrecv_all_if(dhcpd_t)
|
|
|
|
corenet_udp_sendrecv_all_if(dhcpd_t)
|
|
|
|
corenet_raw_sendrecv_all_if(dhcpd_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(dhcpd_t)
|
|
|
|
corenet_udp_sendrecv_all_nodes(dhcpd_t)
|
|
|
|
corenet_raw_sendrecv_all_nodes(dhcpd_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(dhcpd_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(dhcpd_t)
|
|
|
|
corenet_tcp_bind_all_nodes(dhcpd_t)
|
|
|
|
corenet_udp_bind_all_nodes(dhcpd_t)
|
2005-10-13 20:59:36 +00:00
|
|
|
corenet_tcp_bind_dhcpd_port(dhcpd_t)
|
2005-09-02 14:52:08 +00:00
|
|
|
corenet_udp_bind_dhcpd_port(dhcpd_t)
|
|
|
|
corenet_udp_bind_pxe_port(dhcpd_t)
|
2005-09-16 13:36:26 +00:00
|
|
|
corenet_tcp_connect_all_ports(dhcpd_t)
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_sendrecv_dhcpd_server_packets(dhcpd_t)
|
|
|
|
corenet_sendrecv_pxe_server_packets(dhcpd_t)
|
|
|
|
corenet_sendrecv_all_client_packets(dhcpd_t)
|
2005-09-02 14:52:08 +00:00
|
|
|
|
|
|
|
dev_read_sysfs(dhcpd_t)
|
|
|
|
dev_read_rand(dhcpd_t)
|
|
|
|
dev_read_urand(dhcpd_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(dhcpd_t)
|
|
|
|
fs_search_auto_mountpoints(dhcpd_t)
|
|
|
|
|
|
|
|
term_dontaudit_use_console(dhcpd_t)
|
|
|
|
|
|
|
|
corecmd_exec_bin(dhcpd_t)
|
|
|
|
corecmd_exec_sbin(dhcpd_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(dhcpd_t)
|
2005-09-02 14:52:08 +00:00
|
|
|
|
|
|
|
files_read_etc_files(dhcpd_t)
|
|
|
|
files_read_usr_files(dhcpd_t)
|
|
|
|
files_read_etc_runtime_files(dhcpd_t)
|
|
|
|
files_search_var_lib(dhcpd_t)
|
|
|
|
|
2006-03-02 23:41:11 +00:00
|
|
|
init_use_fds(dhcpd_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
init_use_script_ptys(dhcpd_t)
|
2005-09-02 14:52:08 +00:00
|
|
|
|
|
|
|
libs_use_ld_so(dhcpd_t)
|
|
|
|
libs_use_shared_libs(dhcpd_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(dhcpd_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(dhcpd_t)
|
|
|
|
|
|
|
|
sysnet_read_config(dhcpd_t)
|
|
|
|
sysnet_read_dhcp_config(dhcpd_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(dhcpd_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
userdom_dontaudit_search_sysadm_home_dirs(dhcpd_t)
|
2005-09-02 14:52:08 +00:00
|
|
|
|
|
|
|
ifdef(`distro_gentoo',`
|
|
|
|
allow dhcpd_t self:capability { chown dac_override setgid setuid sys_chroot };
|
|
|
|
')
|
|
|
|
|
|
|
|
ifdef(`targeted_policy',`
|
2006-02-02 21:08:12 +00:00
|
|
|
term_dontaudit_use_unallocated_ttys(dhcpd_t)
|
|
|
|
term_dontaudit_use_generic_ptys(dhcpd_t)
|
2006-01-31 19:21:01 +00:00
|
|
|
files_dontaudit_read_root_files(dhcpd_t)
|
2005-09-02 14:52:08 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-09-02 14:52:08 +00:00
|
|
|
# used for dynamic DNS
|
|
|
|
bind_read_dnssec_keys(dhcpd_t)
|
|
|
|
')
|
|
|
|
|
2006-09-22 17:14:35 +00:00
|
|
|
optional_policy(`
|
|
|
|
dbus_system_bus_client_template(dhcpd,dhcpd_t)
|
|
|
|
dbus_connect_system_bus(dhcpd_t)
|
|
|
|
dbus_send_system_bus(dhcpd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-09-02 14:52:08 +00:00
|
|
|
nis_use_ypbind(dhcpd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2006-02-02 21:08:12 +00:00
|
|
|
nscd_socket_use(dhcpd_t)
|
2005-09-16 13:36:26 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-09-02 14:52:08 +00:00
|
|
|
seutil_sigchld_newrole(dhcpd_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-09-02 14:52:08 +00:00
|
|
|
udev_read_db(dhcpd_t)
|
|
|
|
')
|