Oreon-Lime-R2/selinux-policy/selinux-policy-bc228bd/selinux-policy-bc228bd0c249a9e4aa3dcf238c2b1bb138943b07/policy/modules/contrib/uuidd.if

199 lines
3.8 KiB
Text
Raw Permalink Normal View History

## <summary>UUID generation daemon.</summary>
########################################
## <summary>
## Execute uuidd in the uuidd domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed to transition.
## </summary>
## </param>
#
interface(`uuidd_domtrans',`
gen_require(`
type uuidd_t, uuidd_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, uuidd_exec_t, uuidd_t)
')
########################################
## <summary>
## Execute uuidd init scripts in
## the initrc domain.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`uuidd_initrc_domtrans',`
gen_require(`
type uuidd_initrc_exec_t;
')
init_labeled_script_domtrans($1, uuidd_initrc_exec_t)
')
########################################
## <summary>
## Search uuidd lib directories.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`uuidd_search_lib',`
gen_require(`
type uuidd_var_lib_t;
')
files_search_var_lib($1)
allow $1 uuidd_var_lib_t:dir search_dir_perms;
')
########################################
## <summary>
## Read uuidd lib files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`uuidd_read_lib_files',`
gen_require(`
type uuidd_var_lib_t;
')
files_search_var_lib($1)
read_files_pattern($1, uuidd_var_lib_t, uuidd_var_lib_t)
')
########################################
## <summary>
## Create, read, write, and delete
## uuidd lib files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`uuidd_manage_lib_files',`
gen_require(`
type uuidd_var_lib_t;
')
files_search_var_lib($1)
manage_files_pattern($1, uuidd_var_lib_t, uuidd_var_lib_t)
')
########################################
## <summary>
## Create, read, write, and delete
## uuidd lib directories.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`uuidd_manage_lib_dirs',`
gen_require(`
type uuidd_var_lib_t;
')
files_search_var_lib($1)
manage_dirs_pattern($1, uuidd_var_lib_t, uuidd_var_lib_t)
')
########################################
## <summary>
## Read uuidd pid files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`uuidd_read_pid_files',`
gen_require(`
type uuidd_var_run_t;
')
files_search_pids($1)
allow $1 uuidd_var_run_t:file read_file_perms;
')
########################################
## <summary>
## Connect to uuidd with an unix
## domain stream socket.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`uuidd_stream_connect_manager',`
gen_require(`
type uuidd_t, uuidd_var_run_t, uuidd_var_lib_t;
')
files_search_pids($1)
stream_connect_pattern($1, uuidd_var_run_t, uuidd_var_run_t, uuidd_t)
stream_connect_pattern($1, uuidd_var_lib_t, uuidd_var_lib_t, uuidd_t)
')
########################################
## <summary>
## All of the rules required to
## administrate an uuidd environment.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
## <param name="role">
## <summary>
## Role allowed access.
## </summary>
## </param>
## <rolecap/>
#
interface(`uuidd_admin',`
gen_require(`
type uuidd_t, uuidd_initrc_exec_t;
type uuidd_var_run_t, uuidd_var_lib_t;
')
allow $1 uuidd_t:process signal_perms;
ps_process_pattern($1, uuidd_t)
tunable_policy(`deny_ptrace',`',`
allow $1 uuidd_t:process ptrace;
')
uuidd_initrc_domtrans($1)
domain_system_change_exemption($1)
role_transition $2 uuidd_initrc_exec_t system_r;
allow $2 system_r;
files_search_var_lib($1)
admin_pattern($1, uuidd_var_lib_t)
files_search_pids($1)
admin_pattern($1, uuidd_var_run_t)
')