Chris PeBenito ab58ad
#DESC Zebra - BGP server
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Author:  Russell Coker <russell@coker.com.au>
Chris PeBenito ab58ad
# X-Debian-Packages: zebra
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
Chris PeBenito ab58ad
daemon_domain(zebra, `, sysctl_net_writer')
Chris PeBenito ab58ad
type zebra_conf_t, file_type, sysadmfile;
Chris PeBenito ab58ad
r_dir_file({ initrc_t zebra_t }, zebra_conf_t)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
can_network_server(zebra_t)
Chris PeBenito ab58ad
can_ypbind(zebra_t)
Chris PeBenito ab58ad
allow zebra_t { etc_t etc_runtime_t }:file { getattr read };
Chris PeBenito ab58ad
Chris PeBenito ab58ad
allow zebra_t self:process setcap;
Chris PeBenito ab58ad
allow zebra_t self:capability { setgid setuid net_bind_service net_admin net_raw };
Chris PeBenito ab58ad
file_type_auto_trans(zebra_t, var_run_t, zebra_var_run_t, sock_file)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
logdir_domain(zebra)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# /tmp/.bgpd is such a bad idea!
Chris PeBenito ab58ad
tmp_domain(zebra, `', sock_file)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
allow zebra_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito ab58ad
allow zebra_t self:unix_stream_socket { connectto create_stream_socket_perms };
Chris PeBenito ab58ad
allow zebra_t self:rawip_socket create_socket_perms;
Chris PeBenito ab58ad
allow zebra_t self:netlink_route_socket r_netlink_socket_perms;
Chris PeBenito ab58ad
allow zebra_t zebra_port_t:tcp_socket name_bind;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
allow zebra_t proc_t:file { getattr read };
Chris PeBenito ab58ad
allow zebra_t { sysctl_t sysctl_net_t }:dir search;
Chris PeBenito ab58ad
allow zebra_t sysctl_net_t:file rw_file_perms;