238 lines
4.6 KiB
Plaintext
238 lines
4.6 KiB
Plaintext
|
|
||
|
## <summary>policy for surrogator</summary>
|
||
|
|
||
|
########################################
|
||
|
## <summary>
|
||
|
## Execute surrogator_exec_t in the surrogator domain.
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed to transition.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
#
|
||
|
interface(`surrogator_domtrans',`
|
||
|
gen_require(`
|
||
|
type surrogator_t, surrogator_exec_t;
|
||
|
')
|
||
|
|
||
|
corecmd_search_bin($1)
|
||
|
domtrans_pattern($1, surrogator_exec_t, surrogator_t)
|
||
|
')
|
||
|
|
||
|
######################################
|
||
|
## <summary>
|
||
|
## Execute surrogator in the caller domain.
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed access.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
#
|
||
|
interface(`surrogator_exec',`
|
||
|
gen_require(`
|
||
|
type surrogator_exec_t;
|
||
|
')
|
||
|
|
||
|
corecmd_search_bin($1)
|
||
|
can_exec($1, surrogator_exec_t)
|
||
|
')
|
||
|
|
||
|
########################################
|
||
|
## <summary>
|
||
|
## Search surrogator cache directories.
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed access.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
#
|
||
|
interface(`surrogator_search_cache',`
|
||
|
gen_require(`
|
||
|
type surrogator_cache_t;
|
||
|
')
|
||
|
|
||
|
allow $1 surrogator_cache_t:dir search_dir_perms;
|
||
|
files_search_var($1)
|
||
|
')
|
||
|
|
||
|
########################################
|
||
|
## <summary>
|
||
|
## Read surrogator cache files.
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed access.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
#
|
||
|
interface(`surrogator_read_cache_files',`
|
||
|
gen_require(`
|
||
|
type surrogator_cache_t;
|
||
|
')
|
||
|
|
||
|
files_search_var($1)
|
||
|
read_files_pattern($1, surrogator_cache_t, surrogator_cache_t)
|
||
|
')
|
||
|
|
||
|
########################################
|
||
|
## <summary>
|
||
|
## Create, read, write, and delete
|
||
|
## surrogator cache files.
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed access.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
#
|
||
|
interface(`surrogator_manage_cache_files',`
|
||
|
gen_require(`
|
||
|
type surrogator_cache_t;
|
||
|
')
|
||
|
|
||
|
files_search_var($1)
|
||
|
manage_files_pattern($1, surrogator_cache_t, surrogator_cache_t)
|
||
|
')
|
||
|
|
||
|
########################################
|
||
|
## <summary>
|
||
|
## Manage surrogator cache dirs.
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed access.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
#
|
||
|
interface(`surrogator_manage_cache_dirs',`
|
||
|
gen_require(`
|
||
|
type surrogator_cache_t;
|
||
|
')
|
||
|
|
||
|
files_search_var($1)
|
||
|
manage_dirs_pattern($1, surrogator_cache_t, surrogator_cache_t)
|
||
|
')
|
||
|
|
||
|
|
||
|
########################################
|
||
|
## <summary>
|
||
|
## Search surrogator lib directories.
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed access.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
#
|
||
|
interface(`surrogator_search_lib',`
|
||
|
gen_require(`
|
||
|
type surrogator_var_lib_t;
|
||
|
')
|
||
|
|
||
|
allow $1 surrogator_var_lib_t:dir search_dir_perms;
|
||
|
files_search_var_lib($1)
|
||
|
')
|
||
|
|
||
|
########################################
|
||
|
## <summary>
|
||
|
## Read surrogator lib files.
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed access.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
#
|
||
|
interface(`surrogator_read_lib_files',`
|
||
|
gen_require(`
|
||
|
type surrogator_var_lib_t;
|
||
|
')
|
||
|
|
||
|
files_search_var_lib($1)
|
||
|
read_files_pattern($1, surrogator_var_lib_t, surrogator_var_lib_t)
|
||
|
')
|
||
|
|
||
|
########################################
|
||
|
## <summary>
|
||
|
## Manage surrogator lib files.
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed access.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
#
|
||
|
interface(`surrogator_manage_lib_files',`
|
||
|
gen_require(`
|
||
|
type surrogator_var_lib_t;
|
||
|
')
|
||
|
|
||
|
files_search_var_lib($1)
|
||
|
manage_files_pattern($1, surrogator_var_lib_t, surrogator_var_lib_t)
|
||
|
')
|
||
|
|
||
|
########################################
|
||
|
## <summary>
|
||
|
## Manage surrogator lib directories.
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed access.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
#
|
||
|
interface(`surrogator_manage_lib_dirs',`
|
||
|
gen_require(`
|
||
|
type surrogator_var_lib_t;
|
||
|
')
|
||
|
|
||
|
files_search_var_lib($1)
|
||
|
manage_dirs_pattern($1, surrogator_var_lib_t, surrogator_var_lib_t)
|
||
|
')
|
||
|
|
||
|
|
||
|
########################################
|
||
|
## <summary>
|
||
|
## All of the rules required to administrate
|
||
|
## an surrogator environment
|
||
|
## </summary>
|
||
|
## <param name="domain">
|
||
|
## <summary>
|
||
|
## Domain allowed access.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
## <param name="role">
|
||
|
## <summary>
|
||
|
## Role allowed access.
|
||
|
## </summary>
|
||
|
## </param>
|
||
|
## <rolecap/>
|
||
|
#
|
||
|
interface(`surrogator_admin',`
|
||
|
gen_require(`
|
||
|
type surrogator_t;
|
||
|
type surrogator_cache_t;
|
||
|
type surrogator_var_lib_t;
|
||
|
')
|
||
|
|
||
|
allow $1 surrogator_t:process { signal_perms };
|
||
|
ps_process_pattern($1, surrogator_t)
|
||
|
|
||
|
tunable_policy(`deny_ptrace',`',`
|
||
|
allow $1 surrogator_t:process ptrace;
|
||
|
')
|
||
|
|
||
|
files_search_var($1)
|
||
|
admin_pattern($1, surrogator_cache_t)
|
||
|
|
||
|
files_search_var_lib($1)
|
||
|
admin_pattern($1, surrogator_var_lib_t)
|
||
|
optional_policy(`
|
||
|
systemd_passwd_agent_exec($1)
|
||
|
systemd_read_fifo_file_passwd_run($1)
|
||
|
')
|
||
|
')
|