Chris PeBenito 17de1b
Chris PeBenito 29af4c
policy_module(mailman, 1.8.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
mailman_domain_template(cgi)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type mailman_data_t;
Chris PeBenito 17de1b
files_type(mailman_data_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type mailman_archive_t;
Chris PeBenito 17de1b
files_type(mailman_archive_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type mailman_log_t;
Chris PeBenito 17de1b
logging_log_file(mailman_log_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type mailman_lock_t;
Chris PeBenito 17de1b
files_lock_file(mailman_lock_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
mailman_domain_template(mail)
Chris PeBenito 0bfccd
init_daemon_domain(mailman_mail_t, mailman_mail_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
mailman_domain_template(queue)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Mailman CGI local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 465510
# cjp: the template invocation for cgi should be
Chris PeBenito 17de1b
# in the below optional policy; however, there are no
Chris PeBenito 17de1b
# optionals for file contexts yet, so it is promoted
Chris PeBenito 17de1b
# to global scope until such facilities exist.
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 465510
	dev_read_urand(mailman_cgi_t)
Chris PeBenito 465510
Chris PeBenito 0bfccd
	manage_dirs_pattern(mailman_cgi_t, mailman_archive_t, mailman_archive_t)
Chris PeBenito 0bfccd
	manage_files_pattern(mailman_cgi_t, mailman_archive_t, mailman_archive_t)
Chris PeBenito 0bfccd
	manage_lnk_files_pattern(mailman_cgi_t, mailman_archive_t, mailman_archive_t)
Chris PeBenito 17de1b
Chris PeBenito 3c3c04
	files_search_spool(mailman_cgi_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	term_use_controlling_term(mailman_cgi_t)
Chris PeBenito 17de1b
Chris PeBenito 3c3c04
	# for python pre-compile foolishness
Chris PeBenito 3c3c04
	libs_dontaudit_write_lib_dirs(mailman_cgi_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	apache_sigchld(mailman_cgi_t)
Chris PeBenito 17de1b
	apache_use_fds(mailman_cgi_t)
Chris PeBenito 17de1b
	apache_dontaudit_append_log(mailman_cgi_t)
Chris PeBenito 17de1b
	apache_search_sys_script_state(mailman_cgi_t)
Chris PeBenito 92f08c
	apache_read_config(mailman_cgi_t)
Chris PeBenito 92f08c
	apache_dontaudit_rw_stream_sockets(mailman_cgi_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Mailman mail local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow mailman_mail_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 92f08c
allow mailman_mail_t self:process { signal signull };
Chris PeBenito 92f08c
allow mailman_mail_t self:capability { kill dac_override setuid setgid sys_tty_config };
Chris PeBenito 92f08c
Chris PeBenito 92f08c
manage_dirs_pattern(mailman_mail_t, mailman_archive_t, mailman_archive_t)
Chris PeBenito 92f08c
manage_files_pattern(mailman_mail_t, mailman_archive_t, mailman_archive_t)
Chris PeBenito 92f08c
manage_lnk_files_pattern(mailman_mail_t, mailman_archive_t, mailman_archive_t)
Chris PeBenito 92f08c
Chris PeBenito 92f08c
files_search_spool(mailman_mail_t)
Chris PeBenito 92f08c
Chris PeBenito 92f08c
fs_rw_anon_inodefs_files(mailman_mail_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
mta_dontaudit_rw_delivery_tcp_sockets(mailman_mail_t)
Chris PeBenito 92f08c
mta_dontaudit_rw_queue(mailman_mail_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 3624ef
	courier_read_spool(mailman_mail_t)
Chris PeBenito 3624ef
')
Chris PeBenito 3624ef
Chris PeBenito 3624ef
optional_policy(`
Chris PeBenito 92f08c
	cron_read_pipes(mailman_mail_t)
Chris PeBenito 17de1b
')
Chris PeBenito 92f08c
Chris PeBenito 92f08c
optional_policy(`
Chris PeBenito 92f08c
	postfix_search_spool(mailman_mail_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Mailman queue local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow mailman_queue_t self:capability { setgid setuid };
Chris PeBenito 17de1b
allow mailman_queue_t self:process signal;
Chris PeBenito c0868a
allow mailman_queue_t self:fifo_file rw_fifo_file_perms;
Chris PeBenito 17de1b
allow mailman_queue_t self:unix_dgram_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
manage_dirs_pattern(mailman_queue_t, mailman_archive_t, mailman_archive_t)
Chris PeBenito 0bfccd
manage_files_pattern(mailman_queue_t, mailman_archive_t, mailman_archive_t)
Chris PeBenito 0bfccd
manage_lnk_files_pattern(mailman_queue_t, mailman_archive_t, mailman_archive_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_proc_symlinks(mailman_queue_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
auth_domtrans_chk_passwd(mailman_queue_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_dontaudit_search_pids(mailman_queue_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# for su
Chris PeBenito 17de1b
seutil_dontaudit_search_config(mailman_queue_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
# some of the following could probably be changed to dontaudit, someone who
Chris PeBenito 17de1b
# knows mailman well should test this out and send the changes
Chris PeBenito 296273
userdom_search_user_home_dirs(mailman_queue_t)
Chris PeBenito 296273
Chris PeBenito 92f08c
optional_policy(`
Chris PeBenito 92f08c
	apache_read_config(mailman_queue_t)
Chris PeBenito 92f08c
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 0bfccd
	cron_system_entry(mailman_queue_t, mailman_queue_exec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 92f08c
Chris PeBenito 92f08c
optional_policy(`
Chris PeBenito 92f08c
	su_exec(mailman_queue_t)
Chris PeBenito 92f08c
')