Chris PeBenito 71965a
## <summary>Kernel crash dumping mechanism</summary>
Chris PeBenito 71965a
Chris PeBenito 71965a
######################################
Chris PeBenito 71965a
## <summary>
Chris PeBenito 71965a
##	Execute kdump in the kdump domain.
Chris PeBenito 71965a
## </summary>
Chris PeBenito 71965a
## <param name="domain">
Chris PeBenito 71965a
##	<summary>
Chris PeBenito 71965a
##	The type of the process performing this action.
Chris PeBenito 71965a
##	</summary>
Chris PeBenito 71965a
## </param>
Chris PeBenito 71965a
#
Chris PeBenito 71965a
interface(`kdump_domtrans',`
Chris PeBenito 71965a
	gen_require(`
Chris PeBenito 71965a
		type kdump_t, kdump_exec_t;
Chris PeBenito 71965a
	')
Chris PeBenito 71965a
Chris PeBenito 71965a
	corecmd_search_bin($1)
Chris PeBenito 71965a
	domtrans_pattern($1, kdump_exec_t, kdump_t)
Chris PeBenito 71965a
')
Chris PeBenito 71965a
Chris PeBenito 71965a
#######################################
Chris PeBenito 71965a
## <summary>
Chris PeBenito 71965a
##	Execute kdump in the kdump domain.
Chris PeBenito 71965a
## </summary>
Chris PeBenito 71965a
## <param name="domain">
Chris PeBenito 71965a
##	<summary>
Chris PeBenito 71965a
##	The type of the process performing this action.
Chris PeBenito 71965a
##	</summary>
Chris PeBenito 71965a
## </param>
Chris PeBenito 71965a
#
Chris PeBenito 71965a
interface(`kdump_initrc_domtrans',`
Chris PeBenito 71965a
	gen_require(`
Chris PeBenito 71965a
		type kdump_initrc_exec_t;
Chris PeBenito 71965a
	')
Chris PeBenito 71965a
Chris PeBenito 71965a
	init_labeled_script_domtrans($1, kdump_initrc_exec_t)
Chris PeBenito 71965a
')
Chris PeBenito 71965a
Chris PeBenito 71965a
#####################################
Chris PeBenito 71965a
## <summary>
Chris PeBenito 71965a
##	Read kdump configuration file.
Chris PeBenito 71965a
## </summary>
Chris PeBenito 71965a
## <param name="domain">
Chris PeBenito 71965a
##	<summary>
Chris PeBenito 71965a
##	Domain allowed access.
Chris PeBenito 71965a
##	</summary>
Chris PeBenito 71965a
## </param>
Chris PeBenito 71965a
#
Chris PeBenito 71965a
interface(`kdump_read_config',`
Chris PeBenito 71965a
	gen_require(`
Chris PeBenito 71965a
		type kdump_etc_t;
Chris PeBenito 71965a
	')
Chris PeBenito 71965a
Chris PeBenito 71965a
	files_search_etc($1)
Chris PeBenito 71965a
	allow $1 kdump_etc_t:file read_file_perms;
Chris PeBenito 71965a
')
Chris PeBenito 71965a
Chris PeBenito 71965a
####################################
Chris PeBenito 71965a
## <summary>
Chris PeBenito 71965a
##	Manage kdump configuration file.
Chris PeBenito 71965a
## </summary>
Chris PeBenito 71965a
## <param name="domain">
Chris PeBenito 71965a
##	<summary>
Chris PeBenito 71965a
##	Domain allowed access.
Chris PeBenito 71965a
##	</summary>
Chris PeBenito 71965a
## </param>
Chris PeBenito 71965a
#
Chris PeBenito 71965a
interface(`kdump_manage_config',`
Chris PeBenito 71965a
	gen_require(`
Chris PeBenito 71965a
		type kdump_etc_t;
Chris PeBenito 71965a
	')
Chris PeBenito 71965a
Chris PeBenito 71965a
	files_search_etc($1)
Chris PeBenito 71965a
	allow $1 kdump_etc_t:file manage_file_perms;
Chris PeBenito 71965a
')
Chris PeBenito 71965a
Chris PeBenito 71965a
######################################
Chris PeBenito 71965a
## <summary>
Chris PeBenito 71965a
##	All of the rules required to administrate 
Chris PeBenito 71965a
##	an kdump environment
Chris PeBenito 71965a
## </summary>
Chris PeBenito 71965a
## <param name="domain">
Chris PeBenito 71965a
##	<summary>
Chris PeBenito 71965a
##	Domain allowed access.
Chris PeBenito 71965a
##	</summary>
Chris PeBenito 71965a
## </param>
Chris PeBenito 71965a
## <param name="role">
Chris PeBenito 71965a
##	<summary>
Chris PeBenito 71965a
##	The role to be allowed to manage the kdump domain.
Chris PeBenito 71965a
##	</summary>
Chris PeBenito 71965a
## </param>
Chris PeBenito 71965a
## <rolecap/>
Chris PeBenito 71965a
#
Chris PeBenito 71965a
interface(`kdump_admin',`
Chris PeBenito 71965a
	gen_require(`
Chris PeBenito 71965a
		type kdump_t, kdump_etc_t;
Chris PeBenito 71965a
		type kdump_initrc_exec_t;
Chris PeBenito 71965a
	')
Chris PeBenito 71965a
Chris PeBenito 71965a
	allow $1 kdump_t:process { ptrace signal_perms };
Chris PeBenito 71965a
	ps_process_pattern($1, kdump_t)
Chris PeBenito 71965a
Chris PeBenito 71965a
	init_labeled_script_domtrans($1, kdump_initrc_exec_t)
Chris PeBenito 71965a
	domain_system_change_exemption($1)
Chris PeBenito 71965a
	role_transition $2 kdump_initrc_exec_t system_r;
Chris PeBenito 71965a
	allow $2 system_r;
Chris PeBenito 71965a
Chris PeBenito 71965a
	files_search_etc($1)
Chris PeBenito 71965a
	admin_pattern($1, kdump_etc_t)
Chris PeBenito 71965a
')