selinux-policy/policy/modules/services/rpcbind.if

149 lines
3.0 KiB
Plaintext
Raw Normal View History

2007-06-27 16:31:55 +00:00
## <summary>Universal Addresses to RPC Program Number Mapper</summary>
########################################
## <summary>
## Execute a domain transition to run rpcbind.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
#
interface(`rpcbind_domtrans',`
gen_require(`
type rpcbind_t, rpcbind_exec_t;
')
domtrans_pattern($1, rpcbind_exec_t, rpcbind_t)
2007-06-27 16:31:55 +00:00
')
2009-12-18 15:45:39 +00:00
########################################
## <summary>
## Connect to rpcbindd over an unix stream socket.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`rpcbind_stream_connect',`
gen_require(`
type rpcbind_t, rpcbind_var_run_t;
')
files_search_pids($1)
allow $1 rpcbind_var_run_t:sock_file write;
allow $1 rpcbind_t:unix_stream_socket connectto;
')
2007-06-27 16:31:55 +00:00
########################################
## <summary>
## Read rpcbind PID files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
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;
')
########################################
## <summary>
## Search rpcbind lib directories.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
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)
')
########################################
## <summary>
## Read rpcbind lib files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`rpcbind_read_lib_files',`
gen_require(`
type rpcbind_var_lib_t;
')
read_files_pattern($1, rpcbind_var_lib_t, rpcbind_var_lib_t)
2007-06-27 16:31:55 +00:00
files_search_var_lib($1)
')
########################################
## <summary>
## Create, read, write, and delete
## rpcbind lib files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`rpcbind_manage_lib_files',`
gen_require(`
type rpcbind_var_lib_t;
')
manage_files_pattern($1, rpcbind_var_lib_t, rpcbind_var_lib_t)
2007-06-27 16:31:55 +00:00
files_search_var_lib($1)
')
2008-09-18 18:09:34 +00:00
########################################
## <summary>
2009-12-18 15:45:39 +00:00
## All of the rules required to administrate
2008-09-18 18:09:34 +00:00
## an rpcbind environment
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
## <param name="role">
## <summary>
## The role to be allowed to manage the rpcbind domain.
## </summary>
## </param>
## <rolecap/>
#
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)
2008-10-17 15:52:39 +00:00
2008-10-06 18:33:44 +00:00
init_labeled_script_domtrans($1, rbcbind_initrc_exec_t)
2008-09-18 18:09:34 +00:00
domain_system_change_exemption($1)
role_transition $2 rpcbind_initrc_exec_t system_r;
allow $2 system_r;
')