2005-10-21 16:39:28 +00:00
|
|
|
|
2006-01-17 20:14:04 +00:00
|
|
|
policy_module(canna,1.2.0)
|
2005-10-21 16:39:28 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type canna_t;
|
|
|
|
type canna_exec_t;
|
|
|
|
init_daemon_domain(canna_t,canna_exec_t)
|
|
|
|
|
|
|
|
type canna_log_t;
|
|
|
|
logging_log_file(canna_log_t)
|
|
|
|
|
|
|
|
type canna_var_lib_t;
|
|
|
|
files_type(canna_var_lib_t)
|
|
|
|
|
|
|
|
type canna_var_run_t;
|
|
|
|
files_pid_file(canna_var_run_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
2005-10-24 18:40:24 +00:00
|
|
|
allow canna_t self:capability { setgid setuid net_bind_service };
|
2005-10-21 16:39:28 +00:00
|
|
|
dontaudit canna_t self:capability sys_tty_config;
|
|
|
|
allow canna_t self:process signal_perms;
|
|
|
|
allow canna_t self:unix_stream_socket { connectto create_stream_socket_perms};
|
|
|
|
allow canna_t self:unix_dgram_socket create_stream_socket_perms;
|
|
|
|
allow canna_t self:tcp_socket create_stream_socket_perms;
|
|
|
|
|
|
|
|
allow canna_t canna_log_t:file create_file_perms;
|
2005-10-21 19:36:49 +00:00
|
|
|
allow canna_t canna_log_t:dir { rw_dir_perms setattr };
|
2006-01-13 21:06:49 +00:00
|
|
|
logging_filetrans_log(canna_t,canna_log_t,{ file dir })
|
2005-10-21 16:39:28 +00:00
|
|
|
|
|
|
|
allow canna_t canna_var_lib_t:dir create_dir_perms;
|
|
|
|
allow canna_t canna_var_lib_t:file create_file_perms;
|
|
|
|
allow canna_t canna_var_lib_t:lnk_file create_lnk_perms;
|
2006-01-13 21:06:49 +00:00
|
|
|
files_filetrans_var_lib(canna_t,canna_var_lib_t)
|
2005-10-21 16:39:28 +00:00
|
|
|
|
|
|
|
allow canna_t canna_var_run_t:dir rw_dir_perms;
|
|
|
|
allow canna_t canna_var_run_t:file create_file_perms;
|
|
|
|
allow canna_t canna_var_run_t:sock_file create_file_perms;
|
2006-01-13 21:06:49 +00:00
|
|
|
files_filetrans_pid(canna_t, canna_var_run_t, { file sock_file })
|
2005-10-21 16:39:28 +00:00
|
|
|
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls(canna_t)
|
2005-10-21 16:39:28 +00:00
|
|
|
kernel_read_system_state(canna_t)
|
|
|
|
|
|
|
|
corenet_tcp_sendrecv_all_if(canna_t)
|
|
|
|
corenet_raw_sendrecv_all_if(canna_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes(canna_t)
|
|
|
|
corenet_raw_sendrecv_all_nodes(canna_t)
|
2005-10-21 19:36:49 +00:00
|
|
|
corenet_tcp_sendrecv_all_ports(canna_t)
|
2005-12-06 19:59:50 +00:00
|
|
|
corenet_non_ipsec_sendrecv(canna_t)
|
2005-10-21 16:39:28 +00:00
|
|
|
corenet_tcp_bind_all_nodes(canna_t)
|
|
|
|
corenet_tcp_connect_all_ports(canna_t)
|
|
|
|
|
|
|
|
dev_read_sysfs(canna_t)
|
|
|
|
|
|
|
|
fs_getattr_all_fs(canna_t)
|
|
|
|
fs_search_auto_mountpoints(canna_t)
|
|
|
|
|
|
|
|
term_dontaudit_use_console(canna_t)
|
|
|
|
|
|
|
|
domain_use_wide_inherit_fd(canna_t)
|
|
|
|
|
|
|
|
files_read_etc_files(canna_t)
|
|
|
|
files_read_etc_runtime_files(canna_t)
|
|
|
|
files_read_usr_files(canna_t)
|
|
|
|
files_search_tmp(canna_t)
|
2006-01-31 19:21:01 +00:00
|
|
|
files_dontaudit_read_root_files(canna_t)
|
2005-10-21 16:39:28 +00:00
|
|
|
|
|
|
|
init_use_fd(canna_t)
|
|
|
|
init_use_script_pty(canna_t)
|
|
|
|
|
|
|
|
libs_use_ld_so(canna_t)
|
|
|
|
libs_use_shared_libs(canna_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(canna_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(canna_t)
|
|
|
|
|
|
|
|
sysnet_read_config(canna_t)
|
|
|
|
|
|
|
|
userdom_dontaudit_use_unpriv_user_fd(canna_t)
|
|
|
|
userdom_dontaudit_search_sysadm_home_dir(canna_t)
|
|
|
|
|
|
|
|
ifdef(`targeted_policy',`
|
|
|
|
term_dontaudit_use_unallocated_tty(canna_t)
|
|
|
|
term_dontaudit_use_generic_pty(canna_t)
|
2006-01-31 19:21:01 +00:00
|
|
|
files_dontaudit_read_root_files(canna_t)
|
2005-10-21 16:39:28 +00:00
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`nis',`
|
2005-10-21 16:39:28 +00:00
|
|
|
nis_use_ypbind(canna_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`selinuxutil',`
|
2005-10-21 16:39:28 +00:00
|
|
|
seutil_sigchld_newrole(canna_t)
|
|
|
|
')
|
|
|
|
|
2005-11-23 20:24:27 +00:00
|
|
|
optional_policy(`udev',`
|
2005-10-21 16:39:28 +00:00
|
|
|
udev_read_db(canna_t)
|
|
|
|
')
|