Jeremy Solt 21d23c
## <summary>Corosync Cluster Engine</summary>
Jeremy Solt 538cf9
Jeremy Solt 538cf9
########################################
Jeremy Solt 538cf9
## <summary>
Jeremy Solt 538cf9
##	Execute a domain transition to run corosync.
Jeremy Solt 538cf9
## </summary>
Jeremy Solt 538cf9
## <param name="domain">
Jeremy Solt 538cf9
##	<summary>
Jeremy Solt 538cf9
##	Domain allowed access.
Jeremy Solt 538cf9
##	</summary>
Jeremy Solt 538cf9
## </param>
Jeremy Solt 538cf9
#
Jeremy Solt 538cf9
interface(`corosync_domtrans',`
Jeremy Solt 538cf9
	gen_require(`
Jeremy Solt 538cf9
		type corosync_t, corosync_exec_t;
Jeremy Solt 538cf9
	')
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	domtrans_pattern($1, corosync_exec_t, corosync_t)
Jeremy Solt 538cf9
')
Jeremy Solt 538cf9
Jeremy Solt 538cf9
#######################################
Jeremy Solt 538cf9
## <summary>
Jeremy Solt 538cf9
##	Allow the specified domain to read corosync's log files.
Jeremy Solt 538cf9
## </summary>
Jeremy Solt 538cf9
## <param name="domain">
Jeremy Solt 538cf9
##	<summary>
Jeremy Solt 538cf9
##	Domain allowed access.
Jeremy Solt 538cf9
##	</summary>
Jeremy Solt 538cf9
## </param>
Jeremy Solt 538cf9
#
Jeremy Solt 538cf9
interface(`corosync_read_log',`
Jeremy Solt 538cf9
	gen_require(`
Jeremy Solt 538cf9
		type corosync_var_log_t;
Jeremy Solt 538cf9
	')
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	logging_search_logs($1)
Jeremy Solt 538cf9
	list_dirs_pattern($1, corosync_var_log_t, corosync_var_log_t)
Jeremy Solt 538cf9
	read_files_pattern($1, corosync_var_log_t, corosync_var_log_t)
Jeremy Solt 538cf9
')
Jeremy Solt 538cf9
Jeremy Solt 538cf9
#####################################
Jeremy Solt 538cf9
## <summary>
Jeremy Solt 538cf9
##	Connect to corosync over a unix domain
Jeremy Solt 538cf9
##	stream socket.
Jeremy Solt 538cf9
## </summary>
Jeremy Solt 538cf9
## <param name="domain">
Jeremy Solt 538cf9
##	<summary>
Jeremy Solt 538cf9
##	Domain allowed access.
Jeremy Solt 538cf9
##	</summary>
Jeremy Solt 538cf9
## </param>
Jeremy Solt 538cf9
#
Jeremy Solt 538cf9
interface(`corosync_stream_connect',`
Jeremy Solt 538cf9
	gen_require(`
Jeremy Solt 538cf9
		type corosync_t, corosync_var_run_t;
Jeremy Solt 538cf9
	')
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	files_search_pids($1)
Jeremy Solt 538cf9
	stream_connect_pattern($1, corosync_var_run_t, corosync_var_run_t, corosync_t)
Jeremy Solt 538cf9
')
Jeremy Solt 538cf9
Jeremy Solt 538cf9
######################################
Jeremy Solt 538cf9
## <summary>
Jeremy Solt 7a8e6a
##	All of the rules required to administrate
Jeremy Solt 538cf9
##	an corosync environment
Jeremy Solt 538cf9
## </summary>
Jeremy Solt 538cf9
## <param name="domain">
Jeremy Solt 538cf9
##	<summary>
Jeremy Solt 538cf9
##	Domain allowed access.
Jeremy Solt 538cf9
##	</summary>
Jeremy Solt 538cf9
## </param>
Jeremy Solt 538cf9
## <param name="role">
Jeremy Solt 538cf9
##	<summary>
Jeremy Solt 538cf9
##	The role to be allowed to manage the corosyncd domain.
Jeremy Solt 538cf9
##	</summary>
Jeremy Solt 538cf9
## </param>
Jeremy Solt 538cf9
## <rolecap/>
Jeremy Solt 538cf9
#
Jeremy Solt 538cf9
interface(`corosyncd_admin',`
Jeremy Solt 538cf9
	gen_require(`
Jeremy Solt 538cf9
		type corosync_t, corosync_var_lib_t, corosync_var_log_t;
Jeremy Solt 538cf9
		type corosync_var_run_t, corosync_tmp_t, corosync_tmpfs_t;
Jeremy Solt 538cf9
		type corosync_initrc_exec_t;
Jeremy Solt 538cf9
	')
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	allow $1 corosync_t:process { ptrace signal_perms };
Jeremy Solt 538cf9
	ps_process_pattern($1, corosync_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	init_labeled_script_domtrans($1, corosync_initrc_exec_t)
Jeremy Solt 538cf9
	domain_system_change_exemption($1)
Jeremy Solt 538cf9
	role_transition $2 corosync_initrc_exec_t system_r;
Jeremy Solt 538cf9
	allow $2 system_r;
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	files_list_tmp($1)
Jeremy Solt 538cf9
	admin_pattern($1, corosync_tmp_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	admin_pattern($1, corosync_tmpfs_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	files_list_var_lib($1)
Jeremy Solt 538cf9
	admin_pattern($1, corosync_var_lib_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	logging_list_logs($1)
Jeremy Solt 538cf9
	admin_pattern($1, corosync_var_log_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	files_list_pids($1)
Jeremy Solt 538cf9
	admin_pattern($1, corosync_var_run_t)
Jeremy Solt 538cf9
')