2005-10-21 16:18:11 +00:00
|
|
|
|
2007-06-29 14:48:13 +00:00
|
|
|
policy_module(cyrus,1.4.0)
|
2005-10-21 16:18:11 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type cyrus_t;
|
|
|
|
type cyrus_exec_t;
|
|
|
|
init_daemon_domain(cyrus_t,cyrus_exec_t)
|
|
|
|
|
|
|
|
type cyrus_tmp_t;
|
|
|
|
files_tmp_file(cyrus_tmp_t)
|
|
|
|
|
|
|
|
type cyrus_var_lib_t;
|
|
|
|
files_type(cyrus_var_lib_t)
|
|
|
|
|
|
|
|
type cyrus_var_run_t;
|
|
|
|
files_pid_file(cyrus_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow cyrus_t self:capability { dac_override net_bind_service setgid setuid sys_resource };
|
|
|
|
dontaudit cyrus_t self:capability sys_tty_config;
|
|
|
|
allow cyrus_t self:process ~{ ptrace setcurrent setexec setfscreate setrlimit execmem execstack execheap };
|
|
|
|
allow cyrus_t self:process setrlimit;
|
|
|
|
allow cyrus_t self:fd use;
|
2006-12-12 20:08:08 +00:00
|
|
|
allow cyrus_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
allow cyrus_t self:sock_file read_sock_file_perms;
|
2005-10-21 16:18:11 +00:00
|
|
|
allow cyrus_t self:shm create_shm_perms;
|
|
|
|
allow cyrus_t self:sem create_sem_perms;
|
|
|
|
allow cyrus_t self:msgq create_msgq_perms;
|
|
|
|
allow cyrus_t self:msg { send receive };
|
|
|
|
allow cyrus_t self:unix_dgram_socket create_socket_perms;
|
|
|
|
allow cyrus_t self:unix_stream_socket create_stream_socket_perms;
|
|
|
|
allow cyrus_t self:unix_dgram_socket sendto;
|
|
|
|
allow cyrus_t self:unix_stream_socket connectto;
|
|
|
|
allow cyrus_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
allow cyrus_t self:udp_socket create_socket_perms;
|
2006-07-28 15:13:58 +00:00
|
|
|
allow cyrus_t self:netlink_route_socket r_netlink_socket_perms;
|
2005-10-21 16:18:11 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
manage_dirs_pattern(cyrus_t,cyrus_tmp_t,cyrus_tmp_t)
|
|
|
|
manage_files_pattern(cyrus_t,cyrus_tmp_t,cyrus_tmp_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
files_tmp_filetrans(cyrus_t, cyrus_tmp_t, { file dir })
|
2005-10-21 16:18:11 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
manage_dirs_pattern(cyrus_t,cyrus_var_lib_t,cyrus_var_lib_t)
|
|
|
|
manage_files_pattern(cyrus_t,cyrus_var_lib_t,cyrus_var_lib_t)
|
|
|
|
manage_lnk_files_pattern(cyrus_t,cyrus_var_lib_t,cyrus_var_lib_t)
|
|
|
|
manage_sock_files_pattern(cyrus_t,cyrus_var_lib_t,cyrus_var_lib_t)
|
2006-03-02 23:41:11 +00:00
|
|
|
files_pid_filetrans(cyrus_t,cyrus_var_run_t,file)
|
2005-10-21 16:18:11 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
manage_files_pattern(cyrus_t,cyrus_var_run_t,cyrus_var_run_t)
|
|
|
|
manage_sock_files_pattern(cyrus_t,cyrus_var_run_t,cyrus_var_run_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
files_pid_filetrans(cyrus_t,cyrus_var_run_t,{ file sock_file })
|
2005-10-21 16:18:11 +00:00
|
|
|
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(cyrus_t)
|
2005-10-21 16:18:11 +00:00
|
|
|
kernel_read_system_state(cyrus_t)
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_all_sysctls(cyrus_t)
|
2005-10-21 16:18:11 +00:00
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(cyrus_t)
|
|
|
|
corenet_all_recvfrom_netlabel(cyrus_t)
|
2005-10-21 16:18:11 +00:00
|
|
|
corenet_tcp_sendrecv_all_if(cyrus_t)
|
|
|
|
corenet_udp_sendrecv_all_if(cyrus_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(cyrus_t)
|
|
|
|
corenet_udp_sendrecv_all_nodes(cyrus_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports(cyrus_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(cyrus_t)
|
|
|
|
corenet_tcp_bind_all_nodes(cyrus_t)
|
|
|
|
corenet_tcp_bind_mail_port(cyrus_t)
|
2006-08-29 02:41:00 +00:00
|
|
|
corenet_tcp_bind_lmtp_port(cyrus_t)
|
2005-10-21 16:18:11 +00:00
|
|
|
corenet_tcp_bind_pop_port(cyrus_t)
|
|
|
|
corenet_tcp_connect_all_ports(cyrus_t)
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_sendrecv_mail_server_packets(cyrus_t)
|
|
|
|
corenet_sendrecv_pop_server_packets(cyrus_t)
|
2006-08-29 02:41:00 +00:00
|
|
|
corenet_sendrecv_lmtp_server_packets(cyrus_t)
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_sendrecv_all_client_packets(cyrus_t)
|
2005-10-21 16:18:11 +00:00
|
|
|
|
|
|
|
dev_read_rand(cyrus_t)
|
|
|
|
dev_read_urand(cyrus_t)
|
|
|
|
dev_read_sysfs(cyrus_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(cyrus_t)
|
|
|
|
fs_search_auto_mountpoints(cyrus_t)
|
|
|
|
|
|
|
|
corecmd_exec_bin(cyrus_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds(cyrus_t)
|
2005-10-21 16:18:11 +00:00
|
|
|
|
|
|
|
files_list_var_lib(cyrus_t)
|
|
|
|
files_read_etc_files(cyrus_t)
|
|
|
|
files_read_etc_runtime_files(cyrus_t)
|
2006-09-04 15:15:35 +00:00
|
|
|
files_read_usr_files(cyrus_t)
|
2005-10-21 16:18:11 +00:00
|
|
|
|
|
|
|
libs_use_ld_so(cyrus_t)
|
|
|
|
libs_use_shared_libs(cyrus_t)
|
|
|
|
libs_exec_lib_files(cyrus_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(cyrus_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(cyrus_t)
|
|
|
|
miscfiles_read_certs(cyrus_t)
|
|
|
|
|
|
|
|
sysnet_read_config(cyrus_t)
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
userdom_dontaudit_use_unpriv_user_fds(cyrus_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
userdom_dontaudit_search_sysadm_home_dirs(cyrus_t)
|
|
|
|
userdom_use_unpriv_users_fds(cyrus_t)
|
2006-02-02 21:08:12 +00:00
|
|
|
userdom_use_sysadm_ptys(cyrus_t)
|
2005-10-21 16:18:11 +00:00
|
|
|
|
|
|
|
mta_manage_spool(cyrus_t)
|
2007-04-10 13:10:58 +00:00
|
|
|
mta_send_mail(cyrus_t)
|
2005-10-21 16:18:11 +00:00
|
|
|
|
|
|
|
ifdef(`targeted_policy',`
|
2006-02-02 21:08:12 +00:00
|
|
|
term_dontaudit_use_unallocated_ttys(cyrus_t)
|
|
|
|
term_dontaudit_use_generic_ptys(cyrus_t)
|
2006-01-31 19:21:01 +00:00
|
|
|
files_dontaudit_read_root_files(cyrus_t)
|
2005-10-21 16:18:11 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-21 16:18:11 +00:00
|
|
|
cron_system_entry(cyrus_t,cyrus_exec_t)
|
|
|
|
')
|
|
|
|
|
2007-04-10 13:10:58 +00:00
|
|
|
optional_policy(`
|
|
|
|
kerberos_use(cyrus_t)
|
|
|
|
')
|
|
|
|
|
2006-07-28 15:13:58 +00:00
|
|
|
optional_policy(`
|
|
|
|
ldap_stream_connect(cyrus_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-21 16:18:11 +00:00
|
|
|
nis_use_ypbind(cyrus_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-21 16:18:11 +00:00
|
|
|
sasl_connect(cyrus_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-21 16:18:11 +00:00
|
|
|
seutil_sigchld_newrole(cyrus_t)
|
|
|
|
')
|
|
|
|
|
2006-08-29 02:41:00 +00:00
|
|
|
optional_policy(`
|
|
|
|
snmp_read_snmp_var_lib_files(cyrus_t)
|
2007-06-12 13:06:13 +00:00
|
|
|
snmp_dontaudit_write_snmp_var_lib_files(cyrus_t)
|
2006-08-29 02:41:00 +00:00
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-21 16:18:11 +00:00
|
|
|
udev_read_db(cyrus_t)
|
|
|
|
')
|