Chris PeBenito ab58ad
#DESC RADIUS - Radius server
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Author:  Russell Coker <russell@coker.com.au>
Chris PeBenito ab58ad
# X-Debian-Packages: radiusd-cistron radiusd-livingston xtradius yardradius radiusd-freeradius
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
Chris PeBenito ab58ad
#################################
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Rules for the radiusd_t domain.
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# radiusd_exec_t is the type of the radiusd executable.
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
daemon_domain(radiusd, `, auth')
Chris PeBenito ab58ad
Chris PeBenito ab58ad
etcdir_domain(radiusd)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
system_crond_entry(radiusd_exec_t, radiusd_t)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
allow radiusd_t self:process setsched;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
allow radiusd_t proc_t:file { read getattr };
Chris PeBenito ab58ad
Chris PeBenito ab58ad
dontaudit radiusd_t sysadm_home_dir_t:dir getattr;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# allow pthreads to read kernel version
Chris PeBenito ab58ad
read_sysctl(radiusd_t)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# read config files
Chris PeBenito ab58ad
allow radiusd_t etc_t:dir r_dir_perms;
Chris PeBenito ab58ad
allow radiusd_t { etc_t etc_runtime_t }:file { read getattr };
Chris PeBenito ab58ad
allow radiusd_t etc_t:lnk_file read;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# write log files
Chris PeBenito ab58ad
logdir_domain(radiusd)
Chris PeBenito ab58ad
allow radiusd_t radiusd_log_t:dir create;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
allow radiusd_t usr_t:file r_file_perms;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
can_exec(radiusd_t, lib_t)
Chris PeBenito ab58ad
can_exec(radiusd_t, { bin_t shell_exec_t })
Chris PeBenito ab58ad
allow radiusd_t { bin_t sbin_t }:dir search;
Chris PeBenito ab58ad
allow radiusd_t bin_t:lnk_file read;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
allow radiusd_t devtty_t:chr_file { read write };
Chris PeBenito ab58ad
allow radiusd_t self:fifo_file rw_file_perms;
Chris PeBenito ab58ad
# fsetid is for gzip which needs it when run from scripts
Chris PeBenito ab58ad
# gzip also needs chown access to preserve GID for radwtmp files
Chris PeBenito ab58ad
allow radiusd_t self:capability { chown dac_override fsetid kill setgid setuid sys_resource sys_tty_config };
Chris PeBenito ab58ad
Chris PeBenito ab58ad
can_network_server(radiusd_t)
Chris PeBenito ab58ad
can_ypbind(radiusd_t)
Chris PeBenito ab58ad
allow radiusd_t { radius_port_t radacct_port_t }:udp_socket name_bind;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# for RADIUS proxy port
Chris PeBenito ab58ad
allow radiusd_t port_t:udp_socket name_bind;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
ifdef(`snmpd.te', `
Chris PeBenito ab58ad
can_tcp_connect(radiusd_t, snmpd_t)
Chris PeBenito ab58ad
')
Chris PeBenito ab58ad
ifdef(`logrotate.te', `
Chris PeBenito ab58ad
can_exec(radiusd_t, logrotate_exec_t)
Chris PeBenito ab58ad
')
Chris PeBenito ab58ad
can_udp_send(sysadm_t, radiusd_t)
Chris PeBenito ab58ad
can_udp_send(radiusd_t, sysadm_t)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
allow radiusd_t self:unix_stream_socket create_stream_socket_perms;