Chris PeBenito 31b7c0
#DESC Perdition POP and IMAP proxy
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Author:  Russell Coker <russell@coker.com.au>
Chris PeBenito 31b7c0
# X-Debian-Packages: perdition
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#################################
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Rules for the perdition_t domain.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
daemon_domain(perdition)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
allow perdition_t pop_port_t:tcp_socket name_bind;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
etc_domain(perdition)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Use the network.
Chris PeBenito 31b7c0
can_network_server(perdition_t)
Chris PeBenito 31b7c0
allow perdition_t self:unix_stream_socket create_socket_perms;
Chris PeBenito 31b7c0
allow perdition_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# allow any domain to connect to the proxy
Chris PeBenito 31b7c0
can_tcp_connect(userdomain, perdition_t)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Use capabilities
Chris PeBenito 31b7c0
allow perdition_t self:capability { setgid setuid net_bind_service };
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
allow perdition_t etc_t:file { getattr read };
Chris PeBenito 31b7c0
allow perdition_t etc_t:lnk_file read;