Chris PeBenito 9ff300
Chris PeBenito 3d03a4
policy_module(zebra,1.2.2)
Chris PeBenito 9ff300
Chris PeBenito 9ff300
########################################
Chris PeBenito 9ff300
#
Chris PeBenito 9ff300
# Declarations
Chris PeBenito 9ff300
#
Chris PeBenito 9ff300
Chris PeBenito 9ff300
type zebra_t;
Chris PeBenito 9ff300
type zebra_exec_t;
Chris PeBenito 9ff300
init_daemon_domain(zebra_t,zebra_exec_t)
Chris PeBenito 9ff300
Chris PeBenito 9ff300
type zebra_conf_t;
Chris PeBenito 9ff300
files_type(zebra_conf_t)
Chris PeBenito 9ff300
Chris PeBenito 9ff300
type zebra_log_t;
Chris PeBenito 9ff300
logging_log_file(zebra_log_t)
Chris PeBenito 9ff300
Chris PeBenito 9ff300
type zebra_tmp_t;
Chris PeBenito 9ff300
files_tmp_file(zebra_tmp_t)
Chris PeBenito 9ff300
Chris PeBenito 9ff300
type zebra_var_run_t;
Chris PeBenito 9ff300
files_pid_file(zebra_var_run_t)
Chris PeBenito 9ff300
Chris PeBenito 9ff300
########################################
Chris PeBenito 9ff300
#
Chris PeBenito 9ff300
# Local policy
Chris PeBenito 9ff300
#
Chris PeBenito 9ff300
Chris PeBenito 141cff
allow zebra_t self:capability { setgid setuid net_admin net_raw };
Chris PeBenito 9ff300
dontaudit zebra_t self:capability sys_tty_config;
Chris PeBenito 1354ca
allow zebra_t self:process { signal_perms setcap };
Chris PeBenito 60789e
allow zebra_t self:file { ioctl read write getattr lock append };
Chris PeBenito 9ff300
allow zebra_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 9ff300
allow zebra_t self:unix_stream_socket { connectto create_stream_socket_perms };
Chris PeBenito 3f4188
allow zebra_t self:netlink_route_socket rw_netlink_socket_perms;
Chris PeBenito b0d224
allow zebra_t self:tcp_socket { connect connected_stream_socket_perms };
Chris PeBenito fc6198
allow zebra_t self:udp_socket create_socket_perms;
Chris PeBenito 9ff300
allow zebra_t self:rawip_socket create_socket_perms;
Chris PeBenito 9ff300
Chris PeBenito 9ff300
allow zebra_t zebra_conf_t:dir r_dir_perms;
Chris PeBenito 9ff300
allow zebra_t zebra_conf_t:file r_file_perms;
Chris PeBenito 9ff300
allow zebra_t zebra_conf_t:lnk_file { getattr read };
Chris PeBenito 9ff300
Chris PeBenito 9ff300
allow zebra_t zebra_log_t:file create_file_perms;
Chris PeBenito 9ff300
allow zebra_t zebra_log_t:sock_file create_file_perms;
Chris PeBenito 1354ca
allow zebra_t zebra_log_t:dir { rw_dir_perms setattr };
Chris PeBenito 103fe2
logging_log_filetrans(zebra_t,zebra_log_t,{ sock_file file dir })
Chris PeBenito 9ff300
Chris PeBenito 9ff300
# /tmp/.bgpd is such a bad idea!
Chris PeBenito 9ff300
allow zebra_t zebra_tmp_t:sock_file create_file_perms;
Chris PeBenito 103fe2
files_tmp_filetrans(zebra_t,zebra_tmp_t,sock_file)
Chris PeBenito 9ff300
Chris PeBenito fc6198
allow zebra_t zebra_var_run_t:file manage_file_perms;
Chris PeBenito fc6198
allow zebra_t zebra_var_run_t:sock_file manage_file_perms;
Chris PeBenito fc6198
allow zebra_t zebra_var_run_t:dir rw_dir_perms;
Chris PeBenito 103fe2
files_pid_filetrans(zebra_t,zebra_var_run_t, { file sock_file })
Chris PeBenito 9ff300
Chris PeBenito 9ff300
kernel_read_system_state(zebra_t)
Chris PeBenito 445522
kernel_read_kernel_sysctls(zebra_t)
Chris PeBenito 60789e
kernel_tcp_recvfrom(zebra_t)
Chris PeBenito 445522
kernel_rw_net_sysctls(zebra_t)
Chris PeBenito 9ff300
Chris PeBenito 141cff
corenet_non_ipsec_sendrecv(zebra_t)
Chris PeBenito 9ff300
corenet_tcp_sendrecv_all_if(zebra_t)
Chris PeBenito 694248
corenet_udp_sendrecv_all_if(zebra_t)
Chris PeBenito 9ff300
corenet_raw_sendrecv_all_if(zebra_t)
Chris PeBenito 9ff300
corenet_tcp_sendrecv_all_nodes(zebra_t)
Chris PeBenito 694248
corenet_udp_sendrecv_all_nodes(zebra_t)
Chris PeBenito 9ff300
corenet_raw_sendrecv_all_nodes(zebra_t)
Chris PeBenito 9ff300
corenet_tcp_sendrecv_all_ports(zebra_t)
Chris PeBenito 694248
corenet_udp_sendrecv_all_ports(zebra_t)
Chris PeBenito 9ff300
corenet_tcp_bind_all_nodes(zebra_t)
Chris PeBenito 694248
corenet_udp_bind_all_nodes(zebra_t)
Chris PeBenito 9ff300
corenet_tcp_bind_zebra_port(zebra_t)
Chris PeBenito 46c69c
corenet_udp_bind_router_port(zebra_t)
Chris PeBenito 3d03a4
corenet_sendrecv_zebra_server_packets(zebra_t)
Chris PeBenito 3d03a4
corenet_sendrecv_router_server_packets(zebra_t)
Chris PeBenito 9ff300
Chris PeBenito 60789e
dev_associate_usbfs(zebra_var_run_t)
Chris PeBenito 60789e
dev_list_all_dev_nodes(zebra_t)
Chris PeBenito 9ff300
dev_read_sysfs(zebra_t)
Chris PeBenito 207c47
dev_rw_zero(zebra_t)
Chris PeBenito 9ff300
Chris PeBenito 9ff300
fs_getattr_all_fs(zebra_t)
Chris PeBenito 9ff300
fs_search_auto_mountpoints(zebra_t)
Chris PeBenito 9ff300
Chris PeBenito 9ff300
term_dontaudit_use_console(zebra_t)
Chris PeBenito 60789e
term_list_ptys(zebra_t)
Chris PeBenito 9ff300
Chris PeBenito 15722e
domain_use_interactive_fds(zebra_t)
Chris PeBenito 9ff300
Chris PeBenito 60789e
files_search_etc(zebra_t)
Chris PeBenito 9ff300
files_read_etc_files(zebra_t)
Chris PeBenito 9ff300
files_read_etc_runtime_files(zebra_t)
Chris PeBenito 9ff300
Chris PeBenito 1c1ac6
init_use_fds(zebra_t)
Chris PeBenito 1815ba
init_use_script_ptys(zebra_t)
Chris PeBenito 9ff300
Chris PeBenito 9ff300
libs_use_ld_so(zebra_t)
Chris PeBenito 9ff300
libs_use_shared_libs(zebra_t)
Chris PeBenito 9ff300
Chris PeBenito 9ff300
logging_send_syslog_msg(zebra_t)
Chris PeBenito 9ff300
Chris PeBenito 9ff300
miscfiles_read_localization(zebra_t)
Chris PeBenito 9ff300
Chris PeBenito 9ff300
sysnet_read_config(zebra_t)
Chris PeBenito 9ff300
Chris PeBenito 15722e
userdom_dontaudit_use_unpriv_user_fds(zebra_t)
Chris PeBenito 103fe2
userdom_dontaudit_search_sysadm_home_dirs(zebra_t)
Chris PeBenito 9ff300
Chris PeBenito 9ff300
ifdef(`targeted_policy', `
Chris PeBenito 1815ba
	term_dontaudit_use_unallocated_ttys(zebra_t)
Chris PeBenito 1815ba
	term_dontaudit_use_generic_ptys(zebra_t)
Chris PeBenito 9e04f5
	files_dontaudit_read_root_files(zebra_t)
Chris PeBenito 60789e
	unconfined_sigchld(zebra_t)
Chris PeBenito 60789e
')
Chris PeBenito 60789e
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 60789e
	ldap_use(zebra_t)
Chris PeBenito 9ff300
')
Chris PeBenito 9ff300
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 9ff300
	nis_use_ypbind(zebra_t)
Chris PeBenito 9ff300
')
Chris PeBenito 9ff300
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 1815ba
	rpm_read_pipes(zebra_t)
Chris PeBenito 60789e
')
Chris PeBenito 60789e
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 9ff300
	seutil_sigchld_newrole(zebra_t)
Chris PeBenito 9ff300
')
Chris PeBenito 9ff300
Chris PeBenito bb7170
optional_policy(`
Chris PeBenito 9ff300
	udev_read_db(zebra_t)
Chris PeBenito 9ff300
')