|
|
899b713 |
## <summary>policy for sanlock</summary>
|
|
|
899b713 |
|
|
|
899b713 |
########################################
|
|
|
899b713 |
## <summary>
|
|
|
899b713 |
## Execute a domain transition to run sanlock.
|
|
|
899b713 |
## </summary>
|
|
|
899b713 |
## <param name="domain">
|
|
|
899b713 |
## <summary>
|
|
|
899b713 |
## Domain allowed access.
|
|
|
899b713 |
## </summary>
|
|
|
899b713 |
## </param>
|
|
|
899b713 |
#
|
|
|
899b713 |
interface(`sanlock_domtrans',`
|
|
|
899b713 |
gen_require(`
|
|
|
899b713 |
type sanlock_t, sanlock_exec_t;
|
|
|
899b713 |
')
|
|
|
899b713 |
|
|
|
899b713 |
domtrans_pattern($1, sanlock_exec_t, sanlock_t)
|
|
|
899b713 |
')
|
|
|
899b713 |
|
|
|
899b713 |
########################################
|
|
|
899b713 |
## <summary>
|
|
|
899b713 |
## Execute sanlock server in the sanlock domain.
|
|
|
899b713 |
## </summary>
|
|
|
899b713 |
## <param name="domain">
|
|
|
899b713 |
## <summary>
|
|
|
899b713 |
## The type of the process performing this action.
|
|
|
899b713 |
## </summary>
|
|
|
899b713 |
## </param>
|
|
|
899b713 |
#
|
|
|
899b713 |
interface(`sanlock_initrc_domtrans',`
|
|
|
899b713 |
gen_require(`
|
|
|
899b713 |
type sanlock_initrc_exec_t;
|
|
|
899b713 |
')
|
|
|
899b713 |
|
|
|
899b713 |
init_labeled_script_domtrans($1, sanlock_initrc_exec_t)
|
|
|
899b713 |
')
|
|
|
899b713 |
|
|
|
899b713 |
######################################
|
|
|
899b713 |
## <summary>
|
|
|
899b713 |
## Create, read, write, and delete sanlock PID files.
|
|
|
899b713 |
## </summary>
|
|
|
899b713 |
## <param name="domain">
|
|
|
899b713 |
## <summary>
|
|
|
899b713 |
## Domain allowed access.
|
|
|
899b713 |
## </summary>
|
|
|
899b713 |
## </param>
|
|
|
899b713 |
#
|
|
|
899b713 |
interface(`sanlock_manage_pid_files',`
|
|
|
899b713 |
gen_require(`
|
|
|
899b713 |
type sanlock_var_run_t;
|
|
|
899b713 |
')
|
|
|
899b713 |
|
|
|
899b713 |
files_search_pids($1)
|
|
|
899b713 |
manage_files_pattern($1, sanlock_var_run_t, sanlock_var_run_t)
|
|
|
899b713 |
')
|
|
|
899b713 |
|
|
|
899b713 |
########################################
|
|
|
899b713 |
## <summary>
|
|
Chris PeBenito |
8d4bde9 |
## Connect to sanlock over an unix stream socket.
|
|
|
899b713 |
## </summary>
|
|
|
899b713 |
## <param name="domain">
|
|
Chris PeBenito |
8d4bde9 |
## <summary>
|
|
Chris PeBenito |
8d4bde9 |
## Domain allowed access.
|
|
Chris PeBenito |
8d4bde9 |
## </summary>
|
|
|
899b713 |
## </param>
|
|
|
899b713 |
#
|
|
|
899b713 |
interface(`sanlock_stream_connect',`
|
|
Chris PeBenito |
8d4bde9 |
gen_require(`
|
|
Chris PeBenito |
8d4bde9 |
type sanlock_t, sanlock_var_run_t;
|
|
Chris PeBenito |
8d4bde9 |
')
|
|
|
899b713 |
|
|
Chris PeBenito |
8d4bde9 |
files_search_pids($1)
|
|
Chris PeBenito |
8d4bde9 |
stream_connect_pattern($1, sanlock_var_run_t, sanlock_var_run_t, sanlock_t)
|
|
|
899b713 |
')
|
|
|
899b713 |
|
|
|
899b713 |
########################################
|
|
|
899b713 |
## <summary>
|
|
|
899b713 |
## All of the rules required to administrate
|
|
|
899b713 |
## an sanlock environment
|
|
|
899b713 |
## </summary>
|
|
|
899b713 |
## <param name="domain">
|
|
|
899b713 |
## <summary>
|
|
|
899b713 |
## Domain allowed access.
|
|
|
899b713 |
## </summary>
|
|
|
899b713 |
## </param>
|
|
|
899b713 |
## <param name="role">
|
|
|
899b713 |
## <summary>
|
|
|
899b713 |
## Role allowed access.
|
|
|
899b713 |
## </summary>
|
|
|
899b713 |
## </param>
|
|
|
899b713 |
## <rolecap/>
|
|
|
899b713 |
#
|
|
|
899b713 |
interface(`sanlock_admin',`
|
|
|
899b713 |
gen_require(`
|
|
|
899b713 |
type sanlock_t;
|
|
|
899b713 |
type sanlock_initrc_exec_t;
|
|
|
899b713 |
')
|
|
|
899b713 |
|
|
|
899b713 |
allow $1 sanlock_t:process signal_perms;
|
|
|
899b713 |
ps_process_pattern($1, sanlock_t)
|
|
|
899b713 |
|
|
|
899b713 |
sanlock_initrc_domtrans($1)
|
|
|
899b713 |
domain_system_change_exemption($1)
|
|
|
899b713 |
role_transition $2 sanlock_initrc_exec_t system_r;
|
|
|
899b713 |
allow $2 system_r;
|
|
|
899b713 |
')
|