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
Dan Walsh 3eaa99
allow corosync_t self:capability { dac_override sys_nice sys_ptrace sys_resource ipc_lock };
Dan Walsh 3eaa99
allow corosync_t self:process { setrlimit setsched signal signull };
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
Dan Walsh 3eaa99
can_exec(corosync_t, corosync_exec_t)
Dan Walsh 3eaa99
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)
Dan Walsh 3eaa99
kernel_read_network_state(corosync_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
corecmd_exec_bin(corosync_t)
Dan Walsh 3eaa99
corecmd_exec_shell(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)
Dan Walsh 3eaa99
files_read_usr_files(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
Dan Walsh 3eaa99
userdom_delete_user_tmpfs_files(corosync_t)
Jeremy Solt 538cf9
userdom_rw_user_tmpfs_files(corosync_t)
Jeremy Solt 538cf9
Dan Walsh 3034a8
optional_policy(`
Dan Walsh 3034a8
	gen_require(`
Dan Walsh 3034a8
		attribute unconfined_services;
Dan Walsh 3034a8
	')	
Dan Walsh 3034a8
Dan Walsh 3034a8
	fs_manage_tmpfs_files(corosync_t)
Dan Walsh 3034a8
	init_manage_script_status_files(corosync_t)
Dan Walsh 3eaa99
')
Dan Walsh 3eaa99
Jeremy Solt 538cf9
optional_policy(`
Jeremy Solt 538cf9
	ccs_read_config(corosync_t)
Jeremy Solt 538cf9
')
Jeremy Solt 538cf9
Jeremy Solt 538cf9
optional_policy(`
Dan Walsh 3eaa99
	cmirrord_rw_shm(corosync_t)
Dan Walsh 3eaa99
')
Jeremy Solt 538cf9
Dan Walsh 3eaa99
optional_policy(`
Dan Walsh a66812
	lvm_rw_clvmd_tmpfs_files(corosync_t)
Dan Walsh a66812
')
Dan Walsh a66812
Dan Walsh a66812
optional_policy(`
Dan Walsh 3eaa99
	# to communication with RHCS
Dan Walsh 3eaa99
	rhcs_rw_cluster_shm(corosync_t)
Dan Walsh 3eaa99
	rhcs_rw_cluster_semaphores(corosync_t)
Dan Walsh 3eaa99
	rhcs_stream_connect_cluster(corosync_t)
Miroslav Grepl be5142
	rhcs_read_cluster_lib_files(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
')