2006-05-03 19:58:01 +00:00
|
|
|
|
2009-01-06 20:24:10 +00:00
|
|
|
policy_module(pyzor, 2.0.1)
|
2006-05-03 19:58:01 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type pyzor_t;
|
|
|
|
type pyzor_exec_t;
|
2008-11-05 16:10:46 +00:00
|
|
|
typealias pyzor_t alias { user_pyzor_t staff_pyzor_t sysadm_pyzor_t };
|
|
|
|
typealias pyzor_t alias { auditadm_pyzor_t secadm_pyzor_t };
|
2008-07-23 21:38:39 +00:00
|
|
|
application_domain(pyzor_t, pyzor_exec_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
ubac_constrained(pyzor_t)
|
2006-05-03 19:58:01 +00:00
|
|
|
role system_r types pyzor_t;
|
|
|
|
|
|
|
|
type pyzor_etc_t;
|
|
|
|
files_type(pyzor_etc_t)
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
type pyzor_home_t;
|
|
|
|
typealias pyzor_home_t alias { user_pyzor_home_t staff_pyzor_home_t sysadm_pyzor_home_t };
|
|
|
|
typealias pyzor_home_t alias { auditadm_pyzor_home_t secadm_pyzor_home_t };
|
|
|
|
userdom_user_home_content(pyzor_home_t)
|
2006-05-03 19:58:01 +00:00
|
|
|
|
2007-03-07 21:33:22 +00:00
|
|
|
type pyzor_tmp_t;
|
2008-11-05 16:10:46 +00:00
|
|
|
typealias pyzor_tmp_t alias { user_pyzor_tmp_t staff_pyzor_tmp_t sysadm_pyzor_tmp_t };
|
|
|
|
typealias pyzor_tmp_t alias { auditadm_pyzor_tmp_t secadm_pyzor_tmp_t };
|
2007-03-07 21:33:22 +00:00
|
|
|
files_tmp_file(pyzor_tmp_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
ubac_constrained(pyzor_tmp_t)
|
2007-03-07 21:33:22 +00:00
|
|
|
|
2006-05-03 19:58:01 +00:00
|
|
|
type pyzor_var_lib_t;
|
2008-11-05 16:10:46 +00:00
|
|
|
typealias pyzor_var_lib_t alias { user_pyzor_var_lib_t staff_pyzor_var_lib_t sysadm_pyzor_var_lib_t };
|
|
|
|
typealias pyzor_var_lib_t alias { auditadm_pyzor_var_lib_t secadm_pyzor_var_lib_t };
|
2006-05-03 19:58:01 +00:00
|
|
|
files_type(pyzor_var_lib_t)
|
2008-11-05 16:10:46 +00:00
|
|
|
ubac_constrained(pyzor_var_lib_t)
|
|
|
|
|
|
|
|
type pyzord_t;
|
|
|
|
type pyzord_exec_t;
|
|
|
|
init_daemon_domain(pyzord_t,pyzord_exec_t)
|
|
|
|
|
|
|
|
type pyzord_log_t;
|
|
|
|
logging_log_file(pyzord_log_t)
|
2006-05-03 19:58:01 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
# Pyzor client local policy
|
2006-05-03 19:58:01 +00:00
|
|
|
#
|
|
|
|
|
2006-06-07 17:43:10 +00:00
|
|
|
allow pyzor_t self:udp_socket create_socket_perms;
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
manage_dirs_pattern(pyzor_t, pyzor_home_t, pyzor_home_t)
|
|
|
|
manage_files_pattern(pyzor_t, pyzor_home_t, pyzor_home_t)
|
|
|
|
manage_lnk_files_pattern(pyzor_t, pyzor_home_t, pyzor_home_t)
|
|
|
|
userdom_user_home_dir_filetrans(pyzor_t, pyzor_home_t, { dir file lnk_file })
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow pyzor_t pyzor_var_lib_t:dir list_dir_perms;
|
|
|
|
read_files_pattern(pyzor_t,pyzor_var_lib_t,pyzor_var_lib_t)
|
2006-05-03 19:58:01 +00:00
|
|
|
files_search_var_lib(pyzor_t)
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(pyzor_t, pyzor_tmp_t, pyzor_tmp_t)
|
|
|
|
manage_dirs_pattern(pyzor_t, pyzor_tmp_t, pyzor_tmp_t)
|
2007-03-07 21:33:22 +00:00
|
|
|
files_tmp_filetrans(pyzor_t, pyzor_tmp_t, { file dir })
|
|
|
|
|
2006-06-07 17:43:10 +00:00
|
|
|
kernel_read_kernel_sysctls(pyzor_t)
|
|
|
|
kernel_read_system_state(pyzor_t)
|
|
|
|
|
|
|
|
corecmd_list_bin(pyzor_t)
|
|
|
|
corecmd_getattr_bin_files(pyzor_t)
|
|
|
|
|
2009-01-06 20:24:10 +00:00
|
|
|
corenet_tcp_sendrecv_generic_if(pyzor_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(pyzor_t)
|
2007-06-26 18:43:11 +00:00
|
|
|
corenet_tcp_sendrecv_all_nodes(pyzor_t)
|
2006-06-07 17:43:10 +00:00
|
|
|
corenet_udp_sendrecv_all_nodes(pyzor_t)
|
2007-06-26 18:43:11 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(pyzor_t)
|
2006-06-07 17:43:10 +00:00
|
|
|
corenet_udp_sendrecv_all_ports(pyzor_t)
|
2007-06-26 18:43:11 +00:00
|
|
|
corenet_tcp_connect_http_port(pyzor_t)
|
2006-06-07 17:43:10 +00:00
|
|
|
|
|
|
|
dev_read_urand(pyzor_t)
|
|
|
|
|
2006-05-03 19:58:01 +00:00
|
|
|
files_read_etc_files(pyzor_t)
|
|
|
|
|
|
|
|
auth_use_nsswitch(pyzor_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(pyzor_t)
|
|
|
|
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_dontaudit_search_user_home_dirs(pyzor_t)
|
2006-09-01 15:52:05 +00:00
|
|
|
|
2006-05-03 19:58:01 +00:00
|
|
|
optional_policy(`
|
|
|
|
amavis_manage_lib_files(pyzor_t)
|
2006-06-07 17:43:10 +00:00
|
|
|
amavis_manage_spool_files(pyzor_t)
|
2006-05-03 19:58:01 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
optional_policy(`
|
2007-06-26 18:43:11 +00:00
|
|
|
spamassassin_signal_spamd(pyzor_t)
|
2006-05-03 19:58:01 +00:00
|
|
|
spamassassin_read_spamd_tmp_files(pyzor_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
2008-11-05 16:10:46 +00:00
|
|
|
# Pyzor server local policy
|
2006-05-03 19:58:01 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
allow pyzord_t self:udp_socket create_socket_perms;
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(pyzord_t, pyzor_var_lib_t, pyzor_var_lib_t)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow pyzord_t pyzor_var_lib_t:dir setattr;
|
2008-07-23 21:38:39 +00:00
|
|
|
files_var_lib_filetrans(pyzord_t, pyzor_var_lib_t, { file dir })
|
2006-05-03 19:58:01 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
read_files_pattern(pyzord_t, pyzor_etc_t, pyzor_etc_t)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow pyzord_t pyzor_etc_t:dir list_dir_perms;
|
2006-05-03 19:58:01 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
can_exec(pyzord_t, pyzor_exec_t)
|
2006-05-03 19:58:01 +00:00
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern(pyzord_t, pyzord_log_t, pyzord_log_t)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow pyzord_t pyzord_log_t:dir setattr;
|
2008-07-23 21:38:39 +00:00
|
|
|
logging_log_filetrans(pyzord_t, pyzord_log_t, { file dir } )
|
2006-05-03 19:58:01 +00:00
|
|
|
|
|
|
|
kernel_read_kernel_sysctls(pyzord_t)
|
|
|
|
kernel_read_system_state(pyzord_t)
|
|
|
|
|
|
|
|
dev_read_urand(pyzord_t)
|
|
|
|
|
|
|
|
corecmd_exec_bin(pyzord_t)
|
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled(pyzord_t)
|
|
|
|
corenet_all_recvfrom_netlabel(pyzord_t)
|
2009-01-06 20:24:10 +00:00
|
|
|
corenet_udp_sendrecv_generic_if(pyzord_t)
|
2006-05-03 19:58:01 +00:00
|
|
|
corenet_udp_sendrecv_all_nodes(pyzord_t)
|
|
|
|
corenet_udp_sendrecv_all_ports(pyzord_t)
|
|
|
|
corenet_udp_bind_all_nodes(pyzord_t)
|
|
|
|
corenet_udp_bind_pyzor_port(pyzord_t)
|
2006-05-30 19:46:34 +00:00
|
|
|
corenet_sendrecv_pyzor_server_packets(pyzord_t)
|
2006-05-03 19:58:01 +00:00
|
|
|
|
|
|
|
files_read_etc_files(pyzord_t)
|
|
|
|
|
|
|
|
auth_use_nsswitch(pyzord_t)
|
|
|
|
|
2006-09-01 15:52:05 +00:00
|
|
|
locallogin_dontaudit_use_fds(pyzord_t)
|
|
|
|
|
2006-05-03 19:58:01 +00:00
|
|
|
miscfiles_read_localization(pyzord_t)
|
|
|
|
|
2008-04-29 13:58:34 +00:00
|
|
|
# Do not audit attempts to access /root.
|
2008-11-05 16:10:46 +00:00
|
|
|
userdom_dontaudit_search_user_home_dirs(pyzord_t)
|
|
|
|
|
|
|
|
mta_manage_spool(pyzord_t)
|
2008-04-29 13:58:34 +00:00
|
|
|
|
2006-05-03 19:58:01 +00:00
|
|
|
optional_policy(`
|
|
|
|
logging_send_syslog_msg(pyzord_t)
|
|
|
|
')
|