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