2018-06-23 13:00:56 +00:00
|
|
|
## <summary>shared storage lock manager.</summary>
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute a domain transition to run sanlock.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`sanlock_domtrans',`
|
|
|
|
gen_require(`
|
|
|
|
type sanlock_t, sanlock_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
corecmd_search_bin($1)
|
|
|
|
domtrans_pattern($1, sanlock_exec_t, sanlock_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute sanlock init scripts in
|
|
|
|
## the initrc domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed to transition.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`sanlock_initrc_domtrans',`
|
|
|
|
gen_require(`
|
|
|
|
type sanlock_initrc_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
init_labeled_script_domtrans($1, sanlock_initrc_exec_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
######################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete
|
2020-06-27 20:49:41 +00:00
|
|
|
## sanlock pid files. (Deprecated)
|
2018-06-23 13:00:56 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`sanlock_manage_pid_files',`
|
2020-06-27 20:49:41 +00:00
|
|
|
refpolicywarn(`$0($*) has been deprecated.')
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Connect to sanlock with a unix
|
|
|
|
## domain stream socket.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`sanlock_stream_connect',`
|
|
|
|
gen_require(`
|
2019-09-08 20:55:02 +00:00
|
|
|
type sanlock_t, sanlock_runtime_t;
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
files_search_pids($1)
|
2019-09-08 20:55:02 +00:00
|
|
|
stream_connect_pattern($1, sanlock_runtime_t, sanlock_runtime_t, sanlock_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## All of the rules required to
|
|
|
|
## administrate an sanlock environment.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## Role allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`sanlock_admin',`
|
|
|
|
gen_require(`
|
2019-09-08 20:55:02 +00:00
|
|
|
type sanlock_t, sanlock_initrc_exec_t, sanlock_runtime_t;
|
2018-06-23 13:00:56 +00:00
|
|
|
type sanlock_log_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 sanlock_t:process { ptrace signal_perms };
|
|
|
|
ps_process_pattern($1, sanlock_t)
|
|
|
|
|
|
|
|
init_startstop_service($1, $2, sanlock_t, sanlock_initrc_exec_t)
|
|
|
|
|
|
|
|
files_search_pids($1)
|
2019-09-08 20:55:02 +00:00
|
|
|
admin_pattern($1, sanlock_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
logging_search_logs($1)
|
|
|
|
admin_pattern($1, sanlock_log_t)
|
|
|
|
')
|