Chris PeBenito 799a0b
## <summary>Mailman is for managing electronic mail discussion and e-newsletter lists</summary>
Chris PeBenito 799a0b
Chris PeBenito 799a0b
#######################################
Chris PeBenito 799a0b
## <summary>
Chris PeBenito 799a0b
##	The template to define a mailmain domain.
Chris PeBenito 799a0b
## </summary>
Chris PeBenito 799a0b
## <desc>
Chris PeBenito 799a0b
##	

Chris PeBenito 799a0b
##	This template creates a domain to be used for
Chris PeBenito 799a0b
##	a new mailman daemon.
Chris PeBenito 799a0b
##	

Chris PeBenito 799a0b
## </desc>
Chris PeBenito 799a0b
## <param name="userdomain_prefix">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 799a0b
##	The type of daemon to be used eg, cgi would give mailman_cgi_
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 799a0b
## </param>
Chris PeBenito 799a0b
#
Chris PeBenito 799a0b
template(`mailman_domain_template', `
Chris PeBenito 799a0b
	type mailman_$1_t;
Chris PeBenito 799a0b
	domain_type(mailman_$1_t)
Chris PeBenito 799a0b
	role system_r types mailman_$1_t;
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	type mailman_$1_exec_t;
Chris PeBenito 799a0b
	domain_entry_file(mailman_$1_t, mailman_$1_exec_t)
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	type mailman_$1_tmp_t;
Chris PeBenito 799a0b
	files_tmp_file(mailman_$1_tmp_t)
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	allow mailman_$1_t self:{ unix_stream_socket unix_dgram_socket } create_socket_perms;
Chris PeBenito 799a0b
	allow mailman_$1_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 799a0b
	allow mailman_$1_t self:udp_socket create_socket_perms;
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	allow mailman_$1_t mailman_data_t:dir create_dir_perms;
Chris PeBenito 799a0b
	allow mailman_$1_t mailman_data_t:file create_file_perms;
Chris PeBenito 799a0b
	allow mailman_$1_t mailman_data_t:lnk_file create_lnk_perms;
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	allow mailman_$1_t mailman_lock_t:dir rw_dir_perms;
Chris PeBenito 799a0b
	allow mailman_$1_t mailman_lock_t:file create_file_perms;
Chris PeBenito 103fe2
	files_lock_filetrans(mailman_$1_t,mailman_lock_t)
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	allow mailman_$1_t mailman_log_t:dir rw_dir_perms;
Chris PeBenito 799a0b
	allow mailman_$1_t mailman_log_t:file create_file_perms;
Chris PeBenito 103fe2
	logging_log_filetrans(mailman_$1_t,mailman_log_t)
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	allow mailman_$1_t mailman_$1_tmp_t:dir create_dir_perms;
Chris PeBenito 799a0b
	allow mailman_$1_t mailman_$1_tmp_t:file create_file_perms;
Chris PeBenito 103fe2
	files_tmp_filetrans(mailman_$1_t, mailman_$1_tmp_t, { file dir })
Chris PeBenito 799a0b
Chris PeBenito 445522
	kernel_read_kernel_sysctls(mailman_$1_t)
Chris PeBenito 799a0b
	kernel_read_system_state(mailman_$1_t)
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	corenet_tcp_sendrecv_all_if(mailman_$1_t)
Chris PeBenito 799a0b
	corenet_udp_sendrecv_all_if(mailman_$1_t)
Chris PeBenito 799a0b
	corenet_raw_sendrecv_all_if(mailman_$1_t)
Chris PeBenito 799a0b
	corenet_tcp_sendrecv_all_nodes(mailman_$1_t)
Chris PeBenito 799a0b
	corenet_udp_sendrecv_all_nodes(mailman_$1_t)
Chris PeBenito 799a0b
	corenet_raw_sendrecv_all_nodes(mailman_$1_t)
Chris PeBenito 799a0b
	corenet_tcp_sendrecv_all_ports(mailman_$1_t)
Chris PeBenito 799a0b
	corenet_udp_sendrecv_all_ports(mailman_$1_t)
Chris PeBenito bd7037
	corenet_non_ipsec_sendrecv(mailman_$1_t)
Chris PeBenito 799a0b
	corenet_tcp_bind_all_nodes(mailman_$1_t)
Chris PeBenito 799a0b
	corenet_udp_bind_all_nodes(mailman_$1_t)
Chris PeBenito 799a0b
	corenet_tcp_connect_smtp_port(mailman_$1_t)
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	fs_getattr_xattr_fs(mailman_$1_t)
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	corecmd_exec_bin(mailman_$1_t)
Chris PeBenito 799a0b
	corecmd_exec_sbin(mailman_$1_t)
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	domain_exec_all_entry_files(mailman_$1_t)
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	files_exec_etc_files(mailman_$1_t)
Chris PeBenito 799a0b
	files_list_usr(mailman_$1_t)
Chris PeBenito 799a0b
	files_list_var(mailman_$1_t)
Chris PeBenito 799a0b
	files_list_var_lib(mailman_$1_t)
Chris PeBenito 799a0b
	files_read_var_lib_symlinks(mailman_$1_t)
Chris PeBenito 799a0b
	files_read_etc_runtime_files(mailman_$1_t)
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	libs_use_ld_so(mailman_$1_t)
Chris PeBenito 799a0b
	libs_use_shared_libs(mailman_$1_t)
Chris PeBenito 799a0b
	libs_exec_ld_so(mailman_$1_t)
Chris PeBenito 799a0b
	libs_exec_lib_files(mailman_$1_t)
Chris PeBenito 799a0b
Chris PeBenito 2526a4
	logging_send_syslog_msg(mailman_$1_t)
Chris PeBenito 2526a4
Chris PeBenito 799a0b
	miscfiles_read_localization(mailman_$1_t)
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	sysnet_read_config(mailman_$1_t)
Chris PeBenito 799a0b
Chris PeBenito 132880
	optional_policy(`mount',`
Chris PeBenito 799a0b
		mount_send_nfs_client_request(mailman_$1_t)
Chris PeBenito 799a0b
	')
Chris PeBenito 799a0b
Chris PeBenito 132880
	optional_policy(`nis',`
Chris PeBenito 799a0b
		nis_use_ypbind(mailman_$1_t)
Chris PeBenito 799a0b
	')
Chris PeBenito 799a0b
')
Chris PeBenito 799a0b
Chris PeBenito 799a0b
#######################################
Chris PeBenito 799a0b
## <summary>
Chris PeBenito 799a0b
##	Execute mailman in the mailman domain.
Chris PeBenito 799a0b
## </summary>
Chris PeBenito 799a0b
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 799a0b
##	Domain allowed access.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 799a0b
## </param>
Chris PeBenito 799a0b
#
Chris PeBenito 799a0b
interface(`mailman_domtrans',`
Chris PeBenito 799a0b
	gen_require(`
Chris PeBenito 799a0b
		type mailman_mail_exec_t, mailman_mail_t;
Chris PeBenito 799a0b
	')
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	domain_auto_trans($1, mailman_mail_exec_t, mailman_mail_t)
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	allow $1 mailman_mail_t:fd use;
Chris PeBenito 799a0b
	allow mailman_mail_t $1:fd use;
Chris PeBenito 799a0b
	allow mailman_mail_t $1:fifo_file rw_file_perms;
Chris PeBenito 799a0b
	allow mailman_mail_t $1:process sigchld;
Chris PeBenito 799a0b
')
Chris PeBenito 799a0b
Chris PeBenito 799a0b
#######################################
Chris PeBenito 799a0b
## <summary>
Chris PeBenito 799a0b
##	Execute mailman CGI scripts in the 
Chris PeBenito 799a0b
##	mailman CGI domain.
Chris PeBenito 799a0b
## </summary>
Chris PeBenito 799a0b
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 799a0b
##	Domain allowed access.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 799a0b
## </param>
Chris PeBenito 799a0b
#
Chris PeBenito 799a0b
interface(`mailman_domtrans_cgi',`
Chris PeBenito 799a0b
	gen_require(`
Chris PeBenito 799a0b
		type mailman_cgi_exec_t, mailman_cgi_t;
Chris PeBenito 799a0b
	')
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	domain_auto_trans($1, mailman_cgi_exec_t, mailman_cgi_t)
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	allow $1 mailman_cgi_t:fd use;
Chris PeBenito 799a0b
	allow mailman_cgi_t $1:fd use;
Chris PeBenito 799a0b
	allow mailman_cgi_t $1:fifo_file rw_file_perms;
Chris PeBenito 799a0b
	allow mailman_cgi_t $1:process sigchld;
Chris PeBenito 799a0b
')
Chris PeBenito 799a0b
Chris PeBenito 799a0b
#######################################
Chris PeBenito 799a0b
## <summary>
Chris PeBenito 799a0b
##	Execute mailman in the caller domain.
Chris PeBenito 799a0b
## </summary>
Chris PeBenito 799a0b
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 799a0b
##	Domain allowd access.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 799a0b
## </param>
Chris PeBenito 799a0b
#
Chris PeBenito 799a0b
interface(`mailman_exec',`
Chris PeBenito 799a0b
	gen_require(`
Chris PeBenito 799a0b
		type mailman_mail_exec_t;
Chris PeBenito 799a0b
	')
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	can_exec($1,mailman_mail_exec_t)
Chris PeBenito 799a0b
')
Chris PeBenito 799a0b
Chris PeBenito 799a0b
#######################################
Chris PeBenito 799a0b
## <summary>
Chris PeBenito 799a0b
##	Send generic signals to the mailman cgi domain.
Chris PeBenito 799a0b
## </summary>
Chris PeBenito 799a0b
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 799a0b
##	Domain allowed access.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 799a0b
## </param>
Chris PeBenito 799a0b
#
Chris PeBenito 799a0b
interface(`mailman_signal_cgi',`
Chris PeBenito 799a0b
	gen_require(`
Chris PeBenito 799a0b
		type mailman_cgi_t;
Chris PeBenito 799a0b
	')
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	allow $1 mailman_cgi_t:process signal;
Chris PeBenito 799a0b
')
Chris PeBenito 799a0b
Chris PeBenito 799a0b
#######################################
Chris PeBenito 799a0b
## <summary>
Chris PeBenito 799a0b
##	Allow domain to search data directories.
Chris PeBenito 799a0b
## </summary>
Chris PeBenito 799a0b
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 799a0b
##	Domain allowed access.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 799a0b
## </param>
Chris PeBenito 799a0b
#
Chris PeBenito 799a0b
interface(`mailman_search_data',`
Chris PeBenito 799a0b
	gen_require(`
Chris PeBenito 799a0b
		type mailman_data_t;
Chris PeBenito 799a0b
	')
Chris PeBenito 799a0b
Chris PeBenito 0500e0
	allow $1 mailman_data_t:dir search_dir_perms;
Chris PeBenito 799a0b
')
Chris PeBenito 799a0b
Chris PeBenito 799a0b
#######################################
Chris PeBenito 799a0b
## <summary>
Chris PeBenito 799a0b
##	List the contents of mailman data directories.
Chris PeBenito 799a0b
## </summary>
Chris PeBenito 799a0b
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 799a0b
##	Domain allowed access.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 799a0b
## </param>
Chris PeBenito 799a0b
#
Chris PeBenito 799a0b
interface(`mailman_list_data',`
Chris PeBenito 799a0b
	gen_require(`
Chris PeBenito 799a0b
		type mailman_data_t;
Chris PeBenito 799a0b
	')
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	allow $1 mailman_data_t:dir r_dir_perms;
Chris PeBenito 799a0b
')
Chris PeBenito 799a0b
Chris PeBenito 799a0b
#######################################
Chris PeBenito 799a0b
## <summary>
Chris PeBenito 799a0b
##	Allow read acces to mailman data symbolic links.
Chris PeBenito 799a0b
## </summary>
Chris PeBenito 799a0b
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 799a0b
##	Domain allowed access.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 799a0b
## </param>
Chris PeBenito 799a0b
#
Chris PeBenito 799a0b
interface(`mailman_read_data_symlinks',`
Chris PeBenito 799a0b
	gen_require(`
Chris PeBenito 799a0b
		type mailman_data_t;
Chris PeBenito 799a0b
	')
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	allow $1 mailman_data_t:dir search;
Chris PeBenito 799a0b
	allow $1 mailman_data_t:lnk_file read;
Chris PeBenito 799a0b
')
Chris PeBenito 799a0b
Chris PeBenito 799a0b
#######################################
Chris PeBenito 799a0b
## <summary>
Chris PeBenito 799a0b
##	Create, read, write, and delete
Chris PeBenito 799a0b
##	mailman logs.
Chris PeBenito 799a0b
## </summary>
Chris PeBenito 799a0b
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 799a0b
##	Domain allowed access.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 799a0b
## </param>
Chris PeBenito 799a0b
#
Chris PeBenito 799a0b
interface(`mailman_manage_log',`
Chris PeBenito 799a0b
	gen_require(`
Chris PeBenito 799a0b
		type mailman_log_t;
Chris PeBenito 799a0b
	')
Chris PeBenito 799a0b
Chris PeBenito 799a0b
	allow $1 mailman_log_t:dir rw_dir_perms;
Chris PeBenito 799a0b
	allow $1 mailman_log_t:file create_file_perms;
Chris PeBenito 799a0b
	allow $1 mailman_log_t:lnk_file create_lnk_perms;
Chris PeBenito 799a0b
')
Chris PeBenito 799a0b
Chris PeBenito 799a0b
#######################################
Chris PeBenito 799a0b
## <summary>
Chris PeBenito 799a0b
##	Allow domain to read mailman archive files.
Chris PeBenito 799a0b
## </summary>
Chris PeBenito 799a0b
## <param name="domain">
Chris PeBenito 885b83
##	<summary>
Chris PeBenito 799a0b
##	Domain allowed access.
Chris PeBenito 885b83
##	</summary>
Chris PeBenito 799a0b
## </param>
Chris PeBenito 799a0b
#
Chris PeBenito 799a0b
interface(`mailman_read_archive',`
Chris PeBenito 799a0b
	gen_require(`
Chris PeBenito 799a0b
		type mailman_archive_t;
Chris PeBenito 799a0b
	')
Chris PeBenito 799a0b
Chris PeBenito e6a2ea
	allow $1 mailman_archive_t:dir list_dir_perms;
Chris PeBenito e6a2ea
	allow $1 mailman_archive_t:file r_file_perms;
Chris PeBenito 799a0b
	allow $1 mailman_archive_t:lnk_file { getattr read };
Chris PeBenito 799a0b
')