|
Chris PeBenito |
7c8fc3 |
|
|
Chris PeBenito |
5ea24b |
policy_module(dhcp,1.1.0)
|
|
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 |
7c8fc3 |
sysnet_create_dhcp_state(dhcpd_t,dhcpd_state_t)
|
|
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 |
7c8fc3 |
files_create_tmp_files(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 |
7c8fc3 |
files_create_pid(dhcpd_t,dhcpd_var_run_t)
|
|
Chris PeBenito |
7c8fc3 |
|
|
Chris PeBenito |
7c8fc3 |
kernel_read_system_state(dhcpd_t)
|
|
Chris PeBenito |
7c8fc3 |
kernel_read_kernel_sysctl(dhcpd_t)
|
|
Chris PeBenito |
7c8fc3 |
|
|
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 |
bd7037 |
corenet_non_ipsec_sendrecv(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 |
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 |
7c8fc3 |
domain_use_wide_inherit_fd(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 |
7c8fc3 |
init_use_fd(dhcpd_t)
|
|
Chris PeBenito |
7c8fc3 |
init_use_script_pty(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 |
7c8fc3 |
userdom_dontaudit_use_unpriv_user_fd(dhcpd_t)
|
|
Chris PeBenito |
7c8fc3 |
userdom_dontaudit_search_sysadm_home_dir(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 |
7c8fc3 |
term_dontaudit_use_unallocated_tty(dhcpd_t)
|
|
Chris PeBenito |
7c8fc3 |
term_dontaudit_use_generic_pty(dhcpd_t)
|
|
Chris PeBenito |
7c8fc3 |
files_dontaudit_read_root_file(dhcpd_t)
|
|
Chris PeBenito |
7c8fc3 |
')
|
|
Chris PeBenito |
7c8fc3 |
|
|
Chris PeBenito |
132880 |
optional_policy(`bind',`
|
|
Chris PeBenito |
7c8fc3 |
# used for dynamic DNS
|
|
Chris PeBenito |
7c8fc3 |
bind_read_dnssec_keys(dhcpd_t)
|
|
Chris PeBenito |
7c8fc3 |
')
|
|
Chris PeBenito |
7c8fc3 |
|
|
Chris PeBenito |
132880 |
optional_policy(`mount',`
|
|
Chris PeBenito |
7c8fc3 |
mount_send_nfs_client_request(dhcpd_t)
|
|
Chris PeBenito |
7c8fc3 |
')
|
|
Chris PeBenito |
7c8fc3 |
|
|
Chris PeBenito |
132880 |
optional_policy(`nis',`
|
|
Chris PeBenito |
7c8fc3 |
nis_use_ypbind(dhcpd_t)
|
|
Chris PeBenito |
7c8fc3 |
')
|
|
Chris PeBenito |
7c8fc3 |
|
|
Chris PeBenito |
132880 |
optional_policy(`nscd',`
|
|
Chris PeBenito |
a08248 |
nscd_use_socket(dhcpd_t)
|
|
Chris PeBenito |
a08248 |
')
|
|
Chris PeBenito |
a08248 |
|
|
Chris PeBenito |
132880 |
optional_policy(`selinuxutil',`
|
|
Chris PeBenito |
7c8fc3 |
seutil_sigchld_newrole(dhcpd_t)
|
|
Chris PeBenito |
7c8fc3 |
')
|
|
Chris PeBenito |
7c8fc3 |
|
|
Chris PeBenito |
132880 |
optional_policy(`udev',`
|
|
Chris PeBenito |
7c8fc3 |
udev_read_db(dhcpd_t)
|
|
Chris PeBenito |
7c8fc3 |
')
|