## Universal Addresses to RPC Program Number Mapper
########################################
##
## Execute a domain transition to run rpcbind.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`rpcbind_domtrans',`
gen_require(`
type rpcbind_t, rpcbind_exec_t;
')
domtrans_pattern($1, rpcbind_exec_t, rpcbind_t)
')
########################################
##
## Read rpcbind PID files.
##
##
##
## Domain allowed access.
##
##
#
interface(`rpcbind_read_pid_files',`
gen_require(`
type rpcbind_var_run_t;
')
files_search_pids($1)
allow $1 rpcbind_var_run_t:file read_file_perms;
')
########################################
##
## Search rpcbind lib directories.
##
##
##
## Domain allowed access.
##
##
#
interface(`rpcbind_search_lib',`
gen_require(`
type rpcbind_var_lib_t;
')
allow $1 rpcbind_var_lib_t:dir search_dir_perms;
files_search_var_lib($1)
')
########################################
##
## Read rpcbind lib files.
##
##
##
## Domain allowed access.
##
##
#
interface(`rpcbind_read_lib_files',`
gen_require(`
type rpcbind_var_lib_t;
')
read_files_pattern($1, rpcbind_var_lib_t, rpcbind_var_lib_t)
files_search_var_lib($1)
')
########################################
##
## Create, read, write, and delete
## rpcbind lib files.
##
##
##
## Domain allowed access.
##
##
#
interface(`rpcbind_manage_lib_files',`
gen_require(`
type rpcbind_var_lib_t;
')
manage_files_pattern($1, rpcbind_var_lib_t, rpcbind_var_lib_t)
files_search_var_lib($1)
')
########################################
##
## All of the rules required to administrate
## an rpcbind environment
##
##
##
## Domain allowed access.
##
##
##
##
## The role to be allowed to manage the rpcbind domain.
##
##
##
#
interface(`rpcbind_admin',`
gen_require(`
type rpcbind_t, rpcbind_var_lib_t, rpcbind_var_run_t;
type rpcbind_initrc_exec_t;
')
allow $1 rpcbind_t:process { ptrace signal_perms };
ps_process_pattern($1, rpcbind_t)
init_labeled_script_domtrans($1, rbcbind_initrc_exec_t)
domain_system_change_exemption($1)
role_transition $2 rpcbind_initrc_exec_t system_r;
allow $2 system_r;
')