2018-06-23 13:00:56 +00:00
|
|
|
## <summary>Mirrors a block device over the network to another machine.</summary>
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute a domain transition to
|
|
|
|
## run drbd.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2021-06-30 08:03:44 +00:00
|
|
|
## <summary>
|
2018-06-23 13:00:56 +00:00
|
|
|
## Domain allowed to transition.
|
2021-06-30 08:03:44 +00:00
|
|
|
## </summary>
|
2018-06-23 13:00:56 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`drbd_domtrans',`
|
|
|
|
gen_require(`
|
|
|
|
type drbd_t, drbd_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
corecmd_search_bin($1)
|
|
|
|
domtrans_pattern($1, drbd_exec_t, drbd_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## All of the rules required to
|
|
|
|
## administrate an drbd environment.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## Role allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`drbd_admin',`
|
|
|
|
gen_require(`
|
|
|
|
type drbd_t, drbd_initrc_exec_t, drbd_lock_t;
|
|
|
|
type drbd_var_lib_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 drbd_t:process { ptrace signal_perms };
|
|
|
|
ps_process_pattern($1, drbd_t)
|
|
|
|
|
|
|
|
init_startstop_service($1, $2, drbd_t, drbd_initrc_exec_t)
|
|
|
|
|
|
|
|
files_search_locks($1)
|
|
|
|
admin_pattern($1, drbd_lock_t)
|
|
|
|
|
|
|
|
files_search_var_lib($1)
|
|
|
|
admin_pattern($1, drbd_var_lib_t)
|
|
|
|
')
|