Jeremy Solt 538cf9
policy_module(corosync, 1.0.0)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
########################################
Jeremy Solt 538cf9
#
Jeremy Solt 538cf9
# Declarations
Jeremy Solt 538cf9
#
Jeremy Solt 538cf9
Jeremy Solt 538cf9
type corosync_t;
Jeremy Solt 538cf9
type corosync_exec_t;
Jeremy Solt 538cf9
init_daemon_domain(corosync_t, corosync_exec_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
type corosync_initrc_exec_t;
Jeremy Solt 538cf9
init_script_file(corosync_initrc_exec_t);
Jeremy Solt 538cf9
Jeremy Solt 538cf9
type corosync_tmp_t;
Jeremy Solt 538cf9
files_tmp_file(corosync_tmp_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
type corosync_tmpfs_t;
Jeremy Solt 538cf9
files_tmpfs_file(corosync_tmpfs_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
type corosync_var_lib_t;
Jeremy Solt 538cf9
files_type(corosync_var_lib_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
type corosync_var_log_t;
Jeremy Solt 538cf9
logging_log_file(corosync_var_log_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
type corosync_var_run_t;
Jeremy Solt 538cf9
files_pid_file(corosync_var_run_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
########################################
Jeremy Solt 538cf9
#
Jeremy Solt 538cf9
# corosync local policy
Jeremy Solt 538cf9
#
Jeremy Solt 538cf9
Jeremy Solt 538cf9
allow corosync_t self:capability { sys_nice sys_resource ipc_lock };
Jeremy Solt 538cf9
allow corosync_t self:process { setrlimit setsched signal };
Jeremy Solt 538cf9
Jeremy Solt 538cf9
allow corosync_t self:fifo_file rw_fifo_file_perms;
Jeremy Solt 538cf9
allow corosync_t self:sem create_sem_perms;
Jeremy Solt 538cf9
allow corosync_t self:unix_stream_socket { create_stream_socket_perms connectto };
Jeremy Solt 538cf9
allow corosync_t self:unix_dgram_socket create_socket_perms;
Jeremy Solt 538cf9
allow corosync_t self:udp_socket create_socket_perms;
Jeremy Solt 538cf9
Jeremy Solt 538cf9
manage_dirs_pattern(corosync_t, corosync_tmp_t, corosync_tmp_t)
Jeremy Solt 538cf9
manage_files_pattern(corosync_t, corosync_tmp_t, corosync_tmp_t)
Jeremy Solt 538cf9
files_tmp_filetrans(corosync_t, corosync_tmp_t, { file dir })
Jeremy Solt 538cf9
Jeremy Solt 538cf9
manage_dirs_pattern(corosync_t, corosync_tmpfs_t, corosync_tmpfs_t)
Jeremy Solt 538cf9
manage_files_pattern(corosync_t, corosync_tmpfs_t, corosync_tmpfs_t)
Jeremy Solt 7a8e6a
fs_tmpfs_filetrans(corosync_t, corosync_tmpfs_t, { dir file })
Jeremy Solt 538cf9
Jeremy Solt 538cf9
manage_files_pattern(corosync_t, corosync_var_lib_t, corosync_var_lib_t)
Jeremy Solt 538cf9
manage_dirs_pattern(corosync_t, corosync_var_lib_t, corosync_var_lib_t)
Jeremy Solt 538cf9
manage_sock_files_pattern(corosync_t, corosync_var_lib_t, corosync_var_lib_t)
Jeremy Solt 538cf9
files_var_lib_filetrans(corosync_t, corosync_var_lib_t, { file dir sock_file })
Jeremy Solt 538cf9
Jeremy Solt 538cf9
manage_files_pattern(corosync_t, corosync_var_log_t, corosync_var_log_t)
Jeremy Solt 538cf9
manage_sock_files_pattern(corosync_t, corosync_var_log_t, corosync_var_log_t)
Jeremy Solt 538cf9
logging_log_filetrans(corosync_t, corosync_var_log_t, { sock_file file })
Jeremy Solt 538cf9
Jeremy Solt 538cf9
manage_files_pattern(corosync_t, corosync_var_run_t, corosync_var_run_t)
Jeremy Solt 538cf9
manage_sock_files_pattern(corosync_t, corosync_var_run_t, corosync_var_run_t)
Jeremy Solt 538cf9
files_pid_filetrans(corosync_t, corosync_var_run_t, { file sock_file })
Jeremy Solt 538cf9
Jeremy Solt 538cf9
kernel_read_system_state(corosync_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
corecmd_exec_bin(corosync_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
corenet_udp_bind_netsupport_port(corosync_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
dev_read_urand(corosync_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
domain_read_all_domains_state(corosync_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
files_manage_mounttab(corosync_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
auth_use_nsswitch(corosync_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
init_read_script_state(corosync_t)
Jeremy Solt 538cf9
init_rw_script_tmp_files(corosync_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
logging_send_syslog_msg(corosync_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
miscfiles_read_localization(corosync_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
userdom_rw_user_tmpfs_files(corosync_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
optional_policy(`
Jeremy Solt 538cf9
	ccs_read_config(corosync_t)
Jeremy Solt 538cf9
')
Jeremy Solt 538cf9
Jeremy Solt 538cf9
optional_policy(`
Jeremy Solt 538cf9
	# to communication with RHCS
Jeremy Solt 21d23c
	rhcs_rw_dlm_controld_semaphores(corosync_t)
Jeremy Solt 538cf9
Jeremy Solt 21d23c
	rhcs_rw_fenced_semaphores(corosync_t)
Jeremy Solt 538cf9
Jeremy Solt 21d23c
	rhcs_rw_gfs_controld_semaphores(corosync_t)
Jeremy Solt 538cf9
')
Jeremy Solt 538cf9
Jeremy Solt 538cf9
optional_policy(`
Jeremy Solt 538cf9
	rgmanager_manage_tmpfs_files(corosync_t)
Jeremy Solt 538cf9
')