Blame policy/modules/admin/shutdown.if
|
Chris PeBenito |
7e265a |
## <summary>System shutdown command</summary>
|
|
Chris PeBenito |
7e265a |
|
|
Chris PeBenito |
7e265a |
########################################
|
|
Chris PeBenito |
7e265a |
## <summary>
|
|
Chris PeBenito |
7e265a |
## Execute a domain transition to run shutdown.
|
|
Chris PeBenito |
7e265a |
## </summary>
|
|
Chris PeBenito |
7e265a |
## <param name="domain">
|
|
Chris PeBenito |
7e265a |
## <summary>
|
|
Chris PeBenito |
7e265a |
## Domain allowed to transition.
|
|
Chris PeBenito |
7e265a |
## </summary>
|
|
Chris PeBenito |
7e265a |
## </param>
|
|
Chris PeBenito |
7e265a |
#
|
|
Chris PeBenito |
7e265a |
interface(`shutdown_domtrans',`
|
|
Chris PeBenito |
7e265a |
gen_require(`
|
|
Chris PeBenito |
7e265a |
type shutdown_t, shutdown_exec_t;
|
|
Chris PeBenito |
7e265a |
')
|
|
Chris PeBenito |
7e265a |
|
|
Chris PeBenito |
7e265a |
domtrans_pattern($1, shutdown_exec_t, shutdown_t)
|
|
Chris PeBenito |
7e265a |
|
|
Chris PeBenito |
7e265a |
ifdef(`hide_broken_symptoms', `
|
|
Chris PeBenito |
7e265a |
dontaudit shutdown_t $1:socket_class_set { read write };
|
|
Chris PeBenito |
7e265a |
dontaudit shutdown_t $1:fifo_file { read write };
|
|
Chris PeBenito |
7e265a |
')
|
|
Chris PeBenito |
7e265a |
')
|
|
Chris PeBenito |
7e265a |
|
|
Chris PeBenito |
7e265a |
########################################
|
|
Chris PeBenito |
7e265a |
## <summary>
|
|
Chris PeBenito |
7e265a |
## Execute shutdown in the shutdown domain, and
|
|
Chris PeBenito |
7e265a |
## allow the specified role the shutdown domain.
|
|
Chris PeBenito |
7e265a |
## </summary>
|
|
Chris PeBenito |
7e265a |
## <param name="domain">
|
|
Chris PeBenito |
7e265a |
## <summary>
|
|
Dominick Grift |
77e4b5 |
## Domain allowed to transition.
|
|
Chris PeBenito |
7e265a |
## </summary>
|
|
Chris PeBenito |
7e265a |
## </param>
|
|
Chris PeBenito |
7e265a |
## <param name="role">
|
|
Chris PeBenito |
7e265a |
## <summary>
|
|
Chris PeBenito |
a7ee7f |
## Role allowed access.
|
|
Chris PeBenito |
7e265a |
## </summary>
|
|
Chris PeBenito |
7e265a |
## </param>
|
|
Chris PeBenito |
7e265a |
#
|
|
Chris PeBenito |
7e265a |
interface(`shutdown_run',`
|
|
Chris PeBenito |
7e265a |
gen_require(`
|
|
Chris PeBenito |
7e265a |
type shutdown_t;
|
|
Chris PeBenito |
7e265a |
')
|
|
Chris PeBenito |
7e265a |
|
|
Chris PeBenito |
7e265a |
shutdown_domtrans($1)
|
|
Chris PeBenito |
7e265a |
role $2 types shutdown_t;
|
|
Chris PeBenito |
7e265a |
')
|
|
Chris PeBenito |
7e265a |
|
|
Chris PeBenito |
7e265a |
########################################
|
|
Chris PeBenito |
7e265a |
## <summary>
|
|
Chris PeBenito |
7e265a |
## Get attributes of shutdown executable.
|
|
Chris PeBenito |
7e265a |
## </summary>
|
|
Chris PeBenito |
7e265a |
## <param name="domain">
|
|
Chris PeBenito |
7e265a |
## <summary>
|
|
Chris PeBenito |
7e265a |
## Domain allowed access.
|
|
Chris PeBenito |
7e265a |
## </summary>
|
|
Chris PeBenito |
7e265a |
## </param>
|
|
Chris PeBenito |
7e265a |
#
|
|
Chris PeBenito |
7e265a |
interface(`shutdown_getattr_exec_files',`
|
|
Chris PeBenito |
7e265a |
gen_require(`
|
|
Chris PeBenito |
7e265a |
type shutdown_exec_t;
|
|
Chris PeBenito |
7e265a |
')
|
|
Chris PeBenito |
7e265a |
|
|
Chris PeBenito |
7e265a |
allow $1 shutdown_exec_t:file getattr;
|
|
Chris PeBenito |
7e265a |
')
|