Jeremy Solt 21d23c
## <summary>Aisexec Cluster Engine</summary>
Jeremy Solt 538cf9
Jeremy Solt 538cf9
########################################
Jeremy Solt 538cf9
## <summary>
Jeremy Solt 538cf9
##	Execute a domain transition to run aisexec.
Jeremy Solt 538cf9
## </summary>
Jeremy Solt 538cf9
## <param name="domain">
Jeremy Solt 538cf9
## <summary>
Dominick Grift 288845
##	Domain allowed to transition.
Jeremy Solt 538cf9
## </summary>
Jeremy Solt 538cf9
## </param>
Jeremy Solt 538cf9
#
Jeremy Solt 538cf9
interface(`aisexec_domtrans',`
Jeremy Solt 538cf9
	gen_require(`
Jeremy Solt 538cf9
		type aisexec_t, aisexec_exec_t;
Jeremy Solt 538cf9
	')
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	domtrans_pattern($1, aisexec_exec_t, aisexec_t)
Jeremy Solt 538cf9
')
Jeremy Solt 538cf9
Jeremy Solt 538cf9
#####################################
Jeremy Solt 538cf9
## <summary>
Jeremy Solt 538cf9
##	Connect to aisexec 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(`aisexec_stream_connect',`
Jeremy Solt 538cf9
	gen_require(`
Jeremy Solt 538cf9
		type aisexec_t, aisexec_var_run_t;
Jeremy Solt 538cf9
	')
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	files_search_pids($1)
Jeremy Solt 538cf9
	stream_connect_pattern($1, aisexec_var_run_t, aisexec_var_run_t, aisexec_t)
Jeremy Solt 538cf9
')
Jeremy Solt 538cf9
Jeremy Solt 538cf9
#######################################
Jeremy Solt 538cf9
## <summary>
Jeremy Solt 538cf9
##	Allow the specified domain to read aisexec'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(`aisexec_read_log',`
Jeremy Solt 538cf9
	gen_require(`
Jeremy Solt 538cf9
		type aisexec_var_log_t;
Jeremy Solt 538cf9
	')
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	logging_search_logs($1)
Jeremy Solt 538cf9
	list_dirs_pattern($1, aisexec_var_log_t, aisexec_var_log_t)
Jeremy Solt 538cf9
	read_files_pattern($1, aisexec_var_log_t, aisexec_var_log_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 aisexec 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 aisexecd domain.
Jeremy Solt 538cf9
##	</summary>
Jeremy Solt 538cf9
## </param>
Jeremy Solt 538cf9
## <rolecap/>
Jeremy Solt 538cf9
#
Jeremy Solt 538cf9
interface(`aisexecd_admin',`
Jeremy Solt 538cf9
	gen_require(`
Jeremy Solt 538cf9
		type aisexec_t, aisexec_var_lib_t, aisexec_var_log_t;
Jeremy Solt 538cf9
		type aisexec_var_run_t, aisexec_tmp_t, aisexec_tmpfs_t;
Jeremy Solt 538cf9
		type aisexec_initrc_exec_t;
Jeremy Solt 538cf9
	')
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	allow $1 aisexec_t:process { ptrace signal_perms };
Jeremy Solt 538cf9
	ps_process_pattern($1, aisexec_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	init_labeled_script_domtrans($1, aisexec_initrc_exec_t)
Jeremy Solt 538cf9
	domain_system_change_exemption($1)
Jeremy Solt 538cf9
	role_transition $2 aisexec_initrc_exec_t system_r;
Jeremy Solt 538cf9
	allow $2 system_r;
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	files_list_var_lib($1)
Jeremy Solt 538cf9
	admin_pattern($1, aisexec_var_lib_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	logging_list_logs($1)
Jeremy Solt 538cf9
	admin_pattern($1, aisexec_var_log_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	files_list_pids($1)
Jeremy Solt 538cf9
	admin_pattern($1, aisexec_var_run_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	files_list_tmp($1)
Jeremy Solt 538cf9
	admin_pattern($1, aisexec_tmp_t)
Jeremy Solt 538cf9
Jeremy Solt 538cf9
	admin_pattern($1, aisexec_tmpfs_t)
Jeremy Solt 538cf9
')