Chris PeBenito 17de1b
Chris PeBenito 0251df
policy_module(canna,1.4.0)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Declarations
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type canna_t;
Chris PeBenito 17de1b
type canna_exec_t;
Chris PeBenito 17de1b
init_daemon_domain(canna_t,canna_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type canna_log_t;
Chris PeBenito 17de1b
logging_log_file(canna_log_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type canna_var_lib_t;
Chris PeBenito 17de1b
files_type(canna_var_lib_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
type canna_var_run_t;
Chris PeBenito 17de1b
files_pid_file(canna_var_run_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# Local policy
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
allow canna_t self:capability { setgid setuid net_bind_service };
Chris PeBenito 17de1b
dontaudit canna_t self:capability sys_tty_config;
Chris PeBenito 17de1b
allow canna_t self:process signal_perms;
Chris PeBenito 17de1b
allow canna_t self:unix_stream_socket { connectto create_stream_socket_perms};
Chris PeBenito 17de1b
allow canna_t self:unix_dgram_socket create_stream_socket_perms;
Chris PeBenito 17de1b
allow canna_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito c0868a
manage_files_pattern(canna_t,canna_log_t,canna_log_t)
Chris PeBenito c0868a
allow canna_t canna_log_t:dir setattr;
Chris PeBenito 17de1b
logging_log_filetrans(canna_t,canna_log_t,{ file dir })
Chris PeBenito 17de1b
Chris PeBenito c0868a
manage_dirs_pattern(canna_t,canna_var_lib_t,canna_var_lib_t)
Chris PeBenito c0868a
manage_files_pattern(canna_t,canna_var_lib_t,canna_var_lib_t)
Chris PeBenito c0868a
manage_lnk_files_pattern(canna_t,canna_var_lib_t,canna_var_lib_t)
Chris PeBenito 17de1b
files_var_lib_filetrans(canna_t,canna_var_lib_t,file)
Chris PeBenito 17de1b
Chris PeBenito c0868a
manage_files_pattern(canna_t,canna_var_run_t,canna_var_run_t)
Chris PeBenito c0868a
manage_sock_files_pattern(canna_t,canna_var_run_t,canna_var_run_t)
Chris PeBenito 17de1b
files_pid_filetrans(canna_t, canna_var_run_t, { file sock_file })
Chris PeBenito 17de1b
Chris PeBenito 17de1b
kernel_read_kernel_sysctls(canna_t)
Chris PeBenito 17de1b
kernel_read_system_state(canna_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
corenet_non_ipsec_sendrecv(canna_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_if(canna_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_nodes(canna_t)
Chris PeBenito 17de1b
corenet_tcp_sendrecv_all_ports(canna_t)
Chris PeBenito 17de1b
corenet_tcp_connect_all_ports(canna_t)
Chris PeBenito 17de1b
corenet_sendrecv_all_client_packets(canna_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
dev_read_sysfs(canna_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
fs_getattr_all_fs(canna_t)
Chris PeBenito 17de1b
fs_search_auto_mountpoints(canna_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
domain_use_interactive_fds(canna_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
files_read_etc_files(canna_t)
Chris PeBenito 17de1b
files_read_etc_runtime_files(canna_t)
Chris PeBenito 17de1b
files_read_usr_files(canna_t)
Chris PeBenito 17de1b
files_search_tmp(canna_t)
Chris PeBenito 17de1b
files_dontaudit_read_root_files(canna_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
libs_use_ld_so(canna_t)
Chris PeBenito 17de1b
libs_use_shared_libs(canna_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
logging_send_syslog_msg(canna_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
miscfiles_read_localization(canna_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
sysnet_read_config(canna_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
userdom_dontaudit_use_unpriv_user_fds(canna_t)
Chris PeBenito 17de1b
userdom_dontaudit_search_sysadm_home_dirs(canna_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
ifdef(`targeted_policy',`
Chris PeBenito 17de1b
	term_dontaudit_use_unallocated_ttys(canna_t)
Chris PeBenito 17de1b
	term_dontaudit_use_generic_ptys(canna_t)
Chris PeBenito 17de1b
	files_dontaudit_read_root_files(canna_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	nis_use_ypbind(canna_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	seutil_sigchld_newrole(canna_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
optional_policy(`
Chris PeBenito 17de1b
	udev_read_db(canna_t)
Chris PeBenito 17de1b
')