Blob Blame History Raw
#DESC Ircd - IRC server
#
# Author:  Russell Coker <russell@coker.com.au>
# X-Debian-Packages: ircd dancer-ircd ircd-hybrid ircd-irc2 ircd-ircu
#

#################################
#
# Rules for the ircd_t domain.
#
# ircd_exec_t is the type of the slapd executable.
#
daemon_domain(ircd)

type ircd_port_t, port_type;
allow ircd_t ircd_port_t:tcp_socket name_bind;

etcdir_domain(ircd)
typealias ircd_etc_t alias etc_ircd_t;

logdir_domain(ircd)

var_lib_domain(ircd)

# Use the network.
can_network_server(ircd_t)
can_ypbind(ircd_t)
#allow ircd_t self:fifo_file { read write };
allow ircd_t self:unix_stream_socket create_socket_perms;
allow ircd_t self:unix_dgram_socket create_socket_perms;

allow ircd_t devtty_t:chr_file rw_file_perms;

allow ircd_t sbin_t:dir search;

allow ircd_t proc_t:file { getattr read };

# read config files
allow ircd_t { etc_t etc_runtime_t }:file { getattr read };
allow ircd_t etc_t:lnk_file read;

ifdef(`logrotate.te', `
allow logrotate_t ircd_var_run_t:dir search;
allow logrotate_t ircd_var_run_t:file { getattr read };
')