## Mirrors a block device over the network to another machine. ######################################## ## ## Execute a domain transition to run drbd. ## ## ## ## Domain allowed access. ## ## # interface(`drbd_domtrans',` gen_require(` type drbd_t, drbd_exec_t; ') domtrans_pattern($1, drbd_exec_t, drbd_t) ') ######################################## ## ## Search drbd lib directories. ## ## ## ## Domain allowed access. ## ## # interface(`drbd_search_lib',` gen_require(` type drbd_var_lib_t; ') allow $1 drbd_var_lib_t:dir search_dir_perms; files_search_var_lib($1) ') ######################################## ## ## Read drbd lib files. ## ## ## ## Domain allowed access. ## ## # interface(`drbd_read_lib_files',` gen_require(` type drbd_var_lib_t; ') files_search_var_lib($1) read_files_pattern($1, drbd_var_lib_t, drbd_var_lib_t) ') ######################################## ## ## Create, read, write, and delete ## drbd lib files. ## ## ## ## Domain allowed access. ## ## # interface(`drbd_manage_lib_files',` gen_require(` type drbd_var_lib_t; ') files_search_var_lib($1) manage_files_pattern($1, drbd_var_lib_t, drbd_var_lib_t) ') ######################################## ## ## Manage drbd lib dirs files. ## ## ## ## Domain allowed access. ## ## # interface(`drbd_manage_lib_dirs',` gen_require(` type drbd_var_lib_t; ') files_search_var_lib($1) manage_dirs_pattern($1, drbd_var_lib_t, drbd_var_lib_t) ') ######################################## ## ## All of the rules required to administrate ## an drbd environment ## ## ## ## Domain allowed access. ## ## ## ## ## Role allowed access. ## ## # 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 signal_perms; ps_process_pattern($1, drbd_t) tunable_policy(`deny_ptrace',`',` allow $1 drbd_t:process ptrace; ') init_labeled_script_domtrans($1, drbd_initrc_exec_t) domain_system_change_exemption($1) role_transition $2 drbd_initrc_exec_t system_r; allow $2 system_r; files_search_locks($1) admin_pattern($1, drbd_lock_t) files_search_var_lib($1) admin_pattern($1, drbd_var_lib_t) ')