Chris PeBenito 8242f5
Chris PeBenito 8242f5
policy_module(bitlbee, 1.0.0)
Chris PeBenito 8242f5
Chris PeBenito 8242f5
########################################
Chris PeBenito 8242f5
#
Chris PeBenito 8242f5
# Declarations
Chris PeBenito 8242f5
#
Chris PeBenito 8242f5
Chris PeBenito 8242f5
type bitlbee_t;
Chris PeBenito 8242f5
type bitlbee_exec_t;
Chris PeBenito 8242f5
init_daemon_domain(bitlbee_t, bitlbee_exec_t)
Chris PeBenito 8242f5
inetd_tcp_service_domain(bitlbee_t, bitlbee_exec_t)
Chris PeBenito 8242f5
Chris PeBenito 8242f5
type bitlbee_conf_t;
Chris PeBenito 8242f5
files_config_file(bitlbee_conf_t)
Chris PeBenito 8242f5
Chris PeBenito 8242f5
type bitlbee_var_t;
Chris PeBenito 8242f5
files_type(bitlbee_var_t)
Chris PeBenito 8242f5
Chris PeBenito 8242f5
########################################
Chris PeBenito 8242f5
#
Chris PeBenito 8242f5
# Local policy
Chris PeBenito 8242f5
#
Chris PeBenito 8242f5
#
Chris PeBenito 8242f5
Chris PeBenito 8242f5
allow bitlbee_t self:udp_socket create_socket_perms;
Chris PeBenito 8242f5
allow bitlbee_t self:tcp_socket { create_stream_socket_perms connected_stream_socket_perms };
Chris PeBenito 8242f5
allow bitlbee_t self:unix_stream_socket create_stream_socket_perms;
Chris PeBenito 8242f5
Chris PeBenito 8242f5
bitlbee_read_config(bitlbee_t)
Chris PeBenito 8242f5
Chris PeBenito 8242f5
# user account information is read and edited at runtime; give the usual
Chris PeBenito 8242f5
# r/w access to bitlbee_var_t
Chris PeBenito 8242f5
manage_files_pattern(bitlbee_t, bitlbee_var_t, bitlbee_var_t)
Chris PeBenito 8242f5
files_var_lib_filetrans(bitlbee_t, bitlbee_var_t, file)
Chris PeBenito 8242f5
Chris PeBenito 8242f5
corenet_all_recvfrom_unlabeled(bitlbee_t)
Chris PeBenito 8242f5
corenet_udp_sendrecv_generic_if(bitlbee_t)
Chris PeBenito 8242f5
corenet_udp_sendrecv_generic_node(bitlbee_t)
Chris PeBenito 8242f5
corenet_udp_sendrecv_lo_node(bitlbee_t)
Chris PeBenito 8242f5
corenet_tcp_sendrecv_generic_if(bitlbee_t)
Chris PeBenito 8242f5
corenet_tcp_sendrecv_generic_node(bitlbee_t)
Chris PeBenito 8242f5
corenet_tcp_sendrecv_lo_node(bitlbee_t)
Chris PeBenito 8242f5
# Allow bitlbee to connect to jabber servers
Chris PeBenito 8242f5
corenet_tcp_connect_jabber_client_port(bitlbee_t)
Chris PeBenito 8242f5
corenet_tcp_sendrecv_jabber_client_port(bitlbee_t)
Chris PeBenito 8242f5
# to AIM servers:
Chris PeBenito 8242f5
corenet_tcp_connect_aol_port(bitlbee_t)
Chris PeBenito 8242f5
corenet_tcp_sendrecv_aol_port(bitlbee_t)
Chris PeBenito 8242f5
# and to MMCC (Yahoo IM) servers:
Chris PeBenito 8242f5
corenet_tcp_connect_mmcc_port(bitlbee_t)
Chris PeBenito 8242f5
corenet_tcp_sendrecv_mmcc_port(bitlbee_t)
Chris PeBenito 8242f5
# and to MSNP (MSN Messenger) servers:
Chris PeBenito 8242f5
corenet_tcp_connect_msnp_port(bitlbee_t)
Chris PeBenito 8242f5
corenet_tcp_sendrecv_msnp_port(bitlbee_t)
Chris PeBenito 8242f5
Chris PeBenito 8242f5
files_read_etc_files(bitlbee_t)
Chris PeBenito 8242f5
files_search_pids(bitlbee_t)
Chris PeBenito 8242f5
# grant read-only access to the user help files
Chris PeBenito 8242f5
files_read_usr_files(bitlbee_t)
Chris PeBenito 8242f5
Chris PeBenito 8242f5
libs_legacy_use_shared_libs(bitlbee_t)
Chris PeBenito 8242f5
libs_use_ld_so(bitlbee_t)
Chris PeBenito 8242f5
Chris PeBenito 8242f5
sysnet_dns_name_resolve(bitlbee_t)
Chris PeBenito 8242f5
Chris PeBenito 8242f5
optional_policy(`
Chris PeBenito 8242f5
	# normally started from inetd using tcpwrappers, so use those entry points
Chris PeBenito 8242f5
	tcpd_wrapped_domain(bitlbee_t, bitlbee_exec_t)
Chris PeBenito 8242f5
')