Chris PeBenito 31b7c0
#DESC Gatekeeper - OpenH.323 voice over IP gate-keeper
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Author:  Russell Coker <russell@coker.com.au>
Chris PeBenito 31b7c0
# X-Debian-Packages: opengate openh323gk
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#################################
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Rules for the gatekeeper_t domain.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# gatekeeper_exec_t is the type of the gk executable.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
daemon_domain(gatekeeper)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# for SSP
Chris PeBenito 31b7c0
allow gatekeeper_t urandom_device_t:chr_file read;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
etc_domain(gatekeeper)
Chris PeBenito 31b7c0
allow gatekeeper_t gatekeeper_etc_t:lnk_file { getattr read };
Chris PeBenito 31b7c0
logdir_domain(gatekeeper)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Use the network.
Chris PeBenito 31b7c0
can_network_server(gatekeeper_t)
Chris PeBenito 31b7c0
can_ypbind(gatekeeper_t)
Chris PeBenito 31b7c0
allow gatekeeper_t gatekeeper_port_t:{ udp_socket tcp_socket } name_bind;
Chris PeBenito 31b7c0
allow gatekeeper_t self:unix_stream_socket create_socket_perms;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# for stupid symlinks
Chris PeBenito 31b7c0
tmp_domain(gatekeeper)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# pthreads wants to know the kernel version
Chris PeBenito 31b7c0
read_sysctl(gatekeeper_t)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
allow gatekeeper_t etc_t:file { getattr read };
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
allow gatekeeper_t etc_t:dir r_dir_perms;
Chris PeBenito 31b7c0
allow gatekeeper_t sbin_t:dir r_dir_perms;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
allow gatekeeper_t self:process setsched;
Chris PeBenito 31b7c0
allow gatekeeper_t self:fifo_file rw_file_perms;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
allow gatekeeper_t proc_t:file read;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# for local users to run VOIP software
Chris PeBenito 31b7c0
can_udp_send(userdomain, gatekeeper_t)
Chris PeBenito 31b7c0
can_udp_send(gatekeeper_t, userdomain)
Chris PeBenito 31b7c0
can_tcp_connect(gatekeeper_t, userdomain)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# this is crap, gk wants to create symlinks in /etc every time it starts and
Chris PeBenito 31b7c0
# remove them when it exits.
Chris PeBenito 31b7c0
#allow gatekeeper_t etc_t:dir rw_dir_perms;