Chris PeBenito 44fc06
Chris PeBenito ac9aa2
policy_module(radius,1.0.1)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
########################################
Chris PeBenito 44fc06
#
Chris PeBenito 44fc06
# Declarations
Chris PeBenito 44fc06
#
Chris PeBenito 44fc06
Chris PeBenito 44fc06
type radiusd_t;
Chris PeBenito 44fc06
type radiusd_exec_t;
Chris PeBenito 44fc06
init_daemon_domain(radiusd_t,radiusd_exec_t)
Chris PeBenito 44fc06
Chris PeBenito 9bbc75
type radiusd_etc_t;
Chris PeBenito 9bbc75
files_config_file(radiusd_etc_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
type radiusd_log_t;
Chris PeBenito 44fc06
logging_log_file(radiusd_log_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
type radiusd_var_run_t;
Chris PeBenito 44fc06
files_pid_file(radiusd_var_run_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
########################################
Chris PeBenito 44fc06
#
Chris PeBenito 44fc06
# Local policy
Chris PeBenito 44fc06
#
Chris PeBenito 44fc06
Chris PeBenito 44fc06
# fsetid is for gzip which needs it when run from scripts
Chris PeBenito 44fc06
# gzip also needs chown access to preserve GID for radwtmp files
Chris PeBenito 44fc06
allow radiusd_t self:capability { chown dac_override fsetid kill setgid setuid sys_resource sys_tty_config };
Chris PeBenito 44fc06
dontaudit radiusd_t self:capability sys_tty_config;
Chris PeBenito 44fc06
allow radiusd_t self:process setsched;
Chris PeBenito 44fc06
allow radiusd_t self:fifo_file rw_file_perms;
Chris PeBenito 44fc06
allow radiusd_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 44fc06
allow radiusd_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 44fc06
allow radiusd_t self:udp_socket create_socket_perms;
Chris PeBenito 44fc06
Chris PeBenito 44fc06
allow radiusd_t radiusd_etc_t:file r_file_perms;
Chris PeBenito 44fc06
allow radiusd_t radiusd_etc_t:dir r_dir_perms;
Chris PeBenito 44fc06
allow radiusd_t radiusd_etc_t:lnk_file { getattr read };
Chris PeBenito 44fc06
files_search_etc(radiusd_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
allow radiusd_t radiusd_log_t:file create_file_perms;
Don Miner bc6dfa
allow radiusd_t radiusd_log_t:dir create_dir_perms;
Chris PeBenito 44fc06
logging_create_log(radiusd_t,radiusd_log_t,{ file dir })
Chris PeBenito 44fc06
Chris PeBenito 44fc06
allow radiusd_t radiusd_var_run_t:file create_file_perms;
Chris PeBenito 44fc06
allow radiusd_t radiusd_var_run_t:dir rw_dir_perms;
Chris PeBenito 44fc06
files_create_pid(radiusd_t,radiusd_var_run_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
kernel_read_kernel_sysctl(radiusd_t)
Chris PeBenito 44fc06
kernel_read_system_state(radiusd_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
corenet_tcp_sendrecv_all_if(radiusd_t)
Chris PeBenito 44fc06
corenet_udp_sendrecv_all_if(radiusd_t)
Chris PeBenito 44fc06
corenet_raw_sendrecv_all_if(radiusd_t)
Chris PeBenito 44fc06
corenet_tcp_sendrecv_all_nodes(radiusd_t)
Chris PeBenito 44fc06
corenet_udp_sendrecv_all_nodes(radiusd_t)
Chris PeBenito 44fc06
corenet_raw_sendrecv_all_nodes(radiusd_t)
Chris PeBenito 44fc06
corenet_tcp_sendrecv_all_ports(radiusd_t)
Chris PeBenito 44fc06
corenet_udp_sendrecv_all_ports(radiusd_t)
Chris PeBenito bd7037
corenet_non_ipsec_sendrecv(radiusd_t)
Chris PeBenito bd7037
corenet_tcp_bind_all_nodes(radiusd_t)
Chris PeBenito bd7037
corenet_udp_bind_all_nodes(radiusd_t)
Chris PeBenito 44fc06
corenet_udp_bind_radacct_port(radiusd_t)
Chris PeBenito 44fc06
corenet_udp_bind_radius_port(radiusd_t)
Chris PeBenito 44fc06
# for RADIUS proxy port
Chris PeBenito 44fc06
corenet_udp_bind_generic_port(radiusd_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
dev_read_sysfs(radiusd_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
fs_getattr_all_fs(radiusd_t)
Chris PeBenito 44fc06
fs_search_auto_mountpoints(radiusd_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
term_dontaudit_use_console(radiusd_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
auth_read_shadow(radiusd_t)
Chris PeBenito 574e63
auth_domtrans_chk_passwd(radiusd_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
corecmd_exec_bin(radiusd_t)
Chris PeBenito 44fc06
corecmd_exec_shell(radiusd_t)
Chris PeBenito 725926
corecmd_search_sbin(radiusd_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
domain_use_wide_inherit_fd(radiusd_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
files_read_usr_files(radiusd_t)
Chris PeBenito 44fc06
files_read_etc_files(radiusd_t)
Chris PeBenito 44fc06
files_read_etc_runtime_files(radiusd_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
init_use_fd(radiusd_t)
Chris PeBenito 44fc06
init_use_script_pty(radiusd_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
libs_use_ld_so(radiusd_t)
Chris PeBenito 44fc06
libs_use_shared_libs(radiusd_t)
Chris PeBenito 44fc06
libs_exec_lib_files(radiusd_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
logging_send_syslog_msg(radiusd_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
miscfiles_read_localization(radiusd_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
sysnet_read_config(radiusd_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
userdom_dontaudit_use_unpriv_user_fd(radiusd_t)
Chris PeBenito 44fc06
userdom_dontaudit_search_sysadm_home_dir(radiusd_t)
Chris PeBenito 44fc06
userdom_dontaudit_getattr_sysadm_home_dir(radiusd_t)
Chris PeBenito 44fc06
Chris PeBenito 44fc06
ifdef(`targeted_policy', `
Chris PeBenito 44fc06
	term_dontaudit_use_unallocated_tty(radiusd_t)
Chris PeBenito 44fc06
	term_dontaudit_use_generic_pty(radiusd_t)
Chris PeBenito 44fc06
	files_dontaudit_read_root_file(radiusd_t)
Chris PeBenito 44fc06
')
Chris PeBenito 44fc06
Chris PeBenito 132880
optional_policy(`cron',`
Chris PeBenito 44fc06
	cron_system_entry(radiusd_t,radiusd_exec_t)
Chris PeBenito 44fc06
')
Chris PeBenito 44fc06
Chris PeBenito 132880
optional_policy(`logrotate',`
Chris PeBenito 44fc06
	logrotate_exec(radiusd_t)
Chris PeBenito 44fc06
')
Chris PeBenito 44fc06
Chris PeBenito 132880
optional_policy(`nis',`
Chris PeBenito 44fc06
	nis_use_ypbind(radiusd_t)
Chris PeBenito 44fc06
')
Chris PeBenito 44fc06
Chris PeBenito 132880
optional_policy(`selinuxutil',`
Chris PeBenito 44fc06
	seutil_sigchld_newrole(radiusd_t)
Chris PeBenito 44fc06
')
Chris PeBenito 44fc06
Chris PeBenito 132880
optional_policy(`snmp',`
Chris PeBenito 44fc06
	snmp_use(radiusd_t)
Chris PeBenito 44fc06
')
Chris PeBenito 44fc06
Chris PeBenito 132880
optional_policy(`udev',`
Chris PeBenito 44fc06
	udev_read_db(radiusd_t)
Chris PeBenito 44fc06
')