80 lines
1.6 KiB
Text
80 lines
1.6 KiB
Text
## <summary>Linux hardware error daemon.</summary>
|
|
|
|
########################################
|
|
## <summary>
|
|
## Execute a domain transition to run mcelog.
|
|
## </summary>
|
|
## <param name="domain">
|
|
## <summary>
|
|
## Domain allowed to transition.
|
|
## </summary>
|
|
## </param>
|
|
#
|
|
interface(`mcelog_domtrans',`
|
|
gen_require(`
|
|
type mcelog_t, mcelog_exec_t;
|
|
')
|
|
|
|
corecmd_search_bin($1)
|
|
domtrans_pattern($1, mcelog_exec_t, mcelog_t)
|
|
')
|
|
|
|
######################################
|
|
## <summary>
|
|
## Read mcelog logs.
|
|
## </summary>
|
|
## <param name="domain">
|
|
## <summary>
|
|
## Domain allowed access.
|
|
## </summary>
|
|
## </param>
|
|
#
|
|
interface(`mcelog_read_log',`
|
|
gen_require(`
|
|
type mcelog_log_t;
|
|
')
|
|
|
|
logging_search_logs($1)
|
|
read_files_pattern($1, mcelog_log_t, mcelog_log_t)
|
|
')
|
|
|
|
########################################
|
|
## <summary>
|
|
## All of the rules required to
|
|
## administrate an mcelog environment.
|
|
## </summary>
|
|
## <param name="domain">
|
|
## <summary>
|
|
## Domain allowed access.
|
|
## </summary>
|
|
## </param>
|
|
## <param name="role">
|
|
## <summary>
|
|
## Role allowed access.
|
|
## </summary>
|
|
## </param>
|
|
## <rolecap/>
|
|
#
|
|
interface(`mcelog_admin',`
|
|
gen_require(`
|
|
type mcelog_t, mcelog_initrc_exec_t, mcelog_log_t;
|
|
type mcelog_var_run_t, mcelog_etc_t;
|
|
')
|
|
|
|
allow $1 mcelog_t:process { ptrace signal_perms };
|
|
ps_process_pattern($1, mcelog_t)
|
|
|
|
init_labeled_script_domtrans($1, mcelog_initrc_exec_t)
|
|
domain_system_change_exemption($1)
|
|
role_transition $2 mcelog_initrc_exec_t system_r;
|
|
allow $2 system_r;
|
|
|
|
files_search_etc($1)
|
|
admin_pattern($1, mcelog_etc_t)
|
|
|
|
logging_search_logs($1)
|
|
admin_pattern($1, mcelog_log_t)
|
|
|
|
files_search_pids($1)
|
|
admin_pattern($1, mcelog_var_run_t)
|
|
')
|