Chris PeBenito e99359
Chris PeBenito e99359
policy_module(pyzor,1.0.0)
Chris PeBenito e99359
Chris PeBenito e99359
########################################
Chris PeBenito e99359
#
Chris PeBenito e99359
# Declarations
Chris PeBenito e99359
#
Chris PeBenito e99359
Chris PeBenito e99359
type pyzor_t;
Chris PeBenito e99359
type pyzor_exec_t;
Chris PeBenito e99359
domain_type(pyzor_t)
Chris PeBenito e99359
domain_entry_file(pyzor_t,pyzor_exec_t)
Chris PeBenito e99359
role system_r types pyzor_t;
Chris PeBenito e99359
Chris PeBenito e99359
type pyzord_t;
Chris PeBenito e99359
type pyzord_exec_t;
Chris PeBenito e99359
domain_type(pyzord_t)
Chris PeBenito e99359
init_daemon_domain(pyzord_t,pyzord_exec_t)
Chris PeBenito e99359
Chris PeBenito e99359
type pyzor_etc_t;
Chris PeBenito e99359
files_type(pyzor_etc_t)
Chris PeBenito e99359
Chris PeBenito e99359
type pyzord_log_t;
Chris PeBenito e99359
logging_log_file(pyzord_log_t)
Chris PeBenito e99359
Chris PeBenito e99359
type pyzor_var_lib_t;
Chris PeBenito e99359
files_type(pyzor_var_lib_t)
Chris PeBenito e99359
Chris PeBenito e99359
########################################
Chris PeBenito e99359
#
Chris PeBenito e99359
# Pyzor local policy
Chris PeBenito e99359
#
Chris PeBenito e99359
Chris PeBenito e99359
allow pyzor_t pyzor_var_lib_t:dir r_dir_perms;
Chris PeBenito e99359
allow pyzor_t pyzor_var_lib_t:file r_file_perms;
Chris PeBenito e99359
files_search_var_lib(pyzor_t)
Chris PeBenito e99359
Chris PeBenito e99359
files_read_etc_files(pyzor_t)
Chris PeBenito e99359
Chris PeBenito e99359
auth_use_nsswitch(pyzor_t)
Chris PeBenito e99359
Chris PeBenito e99359
libs_use_ld_so(pyzor_t)
Chris PeBenito e99359
libs_use_shared_libs(pyzor_t)
Chris PeBenito e99359
Chris PeBenito e99359
miscfiles_read_localization(pyzor_t)
Chris PeBenito e99359
Chris PeBenito e99359
optional_policy(`
Chris PeBenito e99359
	amavis_manage_lib_files(pyzor_t)
Chris PeBenito e99359
')
Chris PeBenito e99359
Chris PeBenito e99359
optional_policy(`
Chris PeBenito e99359
	spamassassin_read_spamd_tmp_files(pyzor_t)
Chris PeBenito e99359
')
Chris PeBenito e99359
Chris PeBenito e99359
########################################
Chris PeBenito e99359
#
Chris PeBenito e99359
# Pyzord local policy
Chris PeBenito e99359
#
Chris PeBenito e99359
Chris PeBenito e99359
allow pyzord_t self:udp_socket create_socket_perms;
Chris PeBenito e99359
Chris PeBenito e99359
allow pyzord_t pyzor_var_lib_t:file create_file_perms;
Chris PeBenito e99359
allow pyzord_t pyzor_var_lib_t:dir { rw_dir_perms setattr };
Chris PeBenito e99359
files_var_lib_filetrans(pyzord_t,pyzor_var_lib_t,{ file dir })
Chris PeBenito e99359
Chris PeBenito e99359
allow pyzord_t pyzor_etc_t:file create_file_perms;
Chris PeBenito e99359
allow pyzord_t pyzor_etc_t:dir r_dir_perms;
Chris PeBenito e99359
Chris PeBenito e99359
can_exec(pyzord_t,pyzor_exec_t)
Chris PeBenito e99359
Chris PeBenito e99359
allow pyzord_t pyzord_log_t:file create_file_perms;
Chris PeBenito e99359
allow pyzord_t pyzord_log_t:dir { rw_dir_perms setattr };
Chris PeBenito e99359
logging_log_filetrans(pyzord_t,pyzord_log_t, { file dir } )
Chris PeBenito e99359
Chris PeBenito e99359
kernel_read_kernel_sysctls(pyzord_t)
Chris PeBenito e99359
kernel_read_system_state(pyzord_t)
Chris PeBenito e99359
Chris PeBenito e99359
dev_read_urand(pyzord_t)
Chris PeBenito e99359
Chris PeBenito e99359
corecmd_exec_bin(pyzord_t)
Chris PeBenito e99359
Chris PeBenito e99359
corenet_raw_sendrecv_all_if(pyzord_t)
Chris PeBenito e99359
corenet_udp_sendrecv_all_if(pyzord_t)
Chris PeBenito e99359
corenet_udp_sendrecv_all_nodes(pyzord_t)
Chris PeBenito e99359
corenet_raw_sendrecv_all_nodes(pyzord_t)
Chris PeBenito e99359
corenet_udp_sendrecv_all_ports(pyzord_t)
Chris PeBenito e99359
corenet_non_ipsec_sendrecv(pyzord_t)
Chris PeBenito e99359
corenet_udp_bind_all_nodes(pyzord_t)
Chris PeBenito e99359
corenet_udp_bind_pyzor_port(pyzord_t)
Chris PeBenito e99359
Chris PeBenito e99359
files_read_etc_files(pyzord_t)
Chris PeBenito e99359
Chris PeBenito e99359
term_dontaudit_use_generic_ptys(pyzord_t)
Chris PeBenito e99359
Chris PeBenito e99359
auth_use_nsswitch(pyzord_t)
Chris PeBenito e99359
Chris PeBenito e99359
libs_use_ld_so(pyzord_t)
Chris PeBenito e99359
libs_use_shared_libs(pyzord_t)
Chris PeBenito e99359
Chris PeBenito e99359
miscfiles_read_localization(pyzord_t)
Chris PeBenito e99359
Chris PeBenito e99359
# only works until we define a different type for maildir
Chris PeBenito e99359
userdom_priveleged_home_dir_manager(pyzord_t)
Chris PeBenito e99359
# Do not audit attempts to access /root.
Chris PeBenito e99359
userdom_dontaudit_search_sysadm_home_dirs(pyzord_t)
Chris PeBenito e99359
userdom_dontaudit_search_staff_home_dirs(pyzord_t)
Chris PeBenito e99359
Chris PeBenito e99359
mta_manage_spool(pyzord_t)
Chris PeBenito e99359
Chris PeBenito e99359
optional_policy(`
Chris PeBenito e99359
	logging_send_syslog_msg(pyzord_t)
Chris PeBenito e99359
')
Chris PeBenito e99359
Chris PeBenito e99359
optional_policy(`
Chris PeBenito e99359
	nscd_socket_use(pyzord_t)
Chris PeBenito e99359
')