|
|
82bef4c |
|
|
|
a05fc81 |
## <summary> policy for openshift </summary>
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Execute openshift server in the openshift domain.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## The type of the process performing this action.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_initrc_domtrans',`
|
|
|
45a090d |
gen_require(`
|
|
|
1651029 |
type openshift_initrc_t;
|
|
|
45a090d |
type openshift_initrc_exec_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
088ad3a |
domtrans_pattern($1, openshift_initrc_exec_t, openshift_initrc_t)
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
3471258 |
## Send a null signal to openshift init scripts.
|
|
|
3471258 |
## </summary>
|
|
|
3471258 |
## <param name="domain">
|
|
|
3471258 |
## <summary>
|
|
|
3471258 |
## Domain allowed access.
|
|
|
3471258 |
## </summary>
|
|
|
3471258 |
## </param>
|
|
|
3471258 |
#
|
|
|
3471258 |
interface(`openshift_initrc_signull',`
|
|
|
3471258 |
gen_require(`
|
|
|
3471258 |
type openshift_initrc_t;
|
|
|
3471258 |
')
|
|
|
3471258 |
|
|
|
3471258 |
allow $1 openshift_initrc_t:process signull;
|
|
|
3471258 |
')
|
|
|
3471258 |
|
|
|
7a27206 |
#######################################
|
|
|
7a27206 |
## <summary>
|
|
|
7a27206 |
## Send a signal to openshift init scripts.
|
|
|
7a27206 |
## </summary>
|
|
|
7a27206 |
## <param name="domain">
|
|
|
7a27206 |
## <summary>
|
|
|
7a27206 |
## Domain allowed access.
|
|
|
7a27206 |
## </summary>
|
|
|
7a27206 |
## </param>
|
|
|
7a27206 |
#
|
|
|
7a27206 |
interface(`openshift_initrc_signal',`
|
|
|
7a27206 |
gen_require(`
|
|
|
7a27206 |
type openshift_initrc_t;
|
|
|
7a27206 |
')
|
|
|
7a27206 |
|
|
|
7a27206 |
allow $1 openshift_initrc_t:process signal;
|
|
|
7a27206 |
')
|
|
|
7a27206 |
|
|
|
3471258 |
########################################
|
|
|
3471258 |
## <summary>
|
|
|
d5d4cfb |
## Send a signal to openshift init scripts.
|
|
|
d5d4cfb |
## </summary>
|
|
|
d5d4cfb |
## <param name="domain">
|
|
|
d5d4cfb |
## <summary>
|
|
|
d5d4cfb |
## Domain allowed access.
|
|
|
d5d4cfb |
## </summary>
|
|
|
d5d4cfb |
## </param>
|
|
|
d5d4cfb |
#
|
|
|
d5d4cfb |
interface(`openshift_initrc_signl',`
|
|
|
d5d4cfb |
gen_require(`
|
|
|
d5d4cfb |
type openshift_initrc_t;
|
|
|
d5d4cfb |
')
|
|
|
d5d4cfb |
|
|
|
d5d4cfb |
allow $1 openshift_initrc_t:process signal;
|
|
|
d5d4cfb |
')
|
|
|
d5d4cfb |
|
|
|
d5d4cfb |
########################################
|
|
|
d5d4cfb |
## <summary>
|
|
|
45a090d |
## Search openshift cache directories.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_search_cache',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_cache_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
allow $1 openshift_cache_t:dir search_dir_perms;
|
|
|
45a090d |
files_search_var($1)
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Read openshift cache files.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_read_cache_files',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_cache_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
files_search_var($1)
|
|
|
aaf88ba |
read_files_pattern($1, openshift_cache_t, openshift_cache_t)
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Create, read, write, and delete
|
|
|
45a090d |
## openshift cache files.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_manage_cache_files',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_cache_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
files_search_var($1)
|
|
|
82bef4c |
manage_files_pattern($1, openshift_cache_t, openshift_cache_t)
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Create, read, write, and delete
|
|
|
45a090d |
## openshift cache dirs.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_manage_cache_dirs',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_cache_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
files_search_var($1)
|
|
|
82bef4c |
manage_dirs_pattern($1, openshift_cache_t, openshift_cache_t)
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Allow the specified domain to read openshift's log files.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
## <rolecap/>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_read_log',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_log_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
logging_search_logs($1)
|
|
|
82bef4c |
read_files_pattern($1, openshift_log_t, openshift_log_t)
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Allow the specified domain to append
|
|
|
45a090d |
## openshift log files.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
82bef4c |
## <summary>
|
|
|
45a090d |
## Domain allowed to transition.
|
|
|
82bef4c |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_append_log',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_log_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
logging_search_logs($1)
|
|
|
82bef4c |
append_files_pattern($1, openshift_log_t, openshift_log_t)
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Allow domain to manage openshift log files
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain to not audit.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_manage_log',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_log_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
logging_search_logs($1)
|
|
|
82bef4c |
manage_dirs_pattern($1, openshift_log_t, openshift_log_t)
|
|
|
82bef4c |
manage_files_pattern($1, openshift_log_t, openshift_log_t)
|
|
|
82bef4c |
manage_lnk_files_pattern($1, openshift_log_t, openshift_log_t)
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Search openshift lib directories.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_search_lib',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_var_lib_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
allow $1 openshift_var_lib_t:dir search_dir_perms;
|
|
|
45a090d |
files_search_var_lib($1)
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Read openshift lib files.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_read_lib_files',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_var_lib_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
files_search_var_lib($1)
|
|
|
82bef4c |
read_files_pattern($1, openshift_var_lib_t, openshift_var_lib_t)
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Read openshift lib files.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_append_lib_files',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_var_lib_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
files_search_var_lib($1)
|
|
|
82bef4c |
append_files_pattern($1, openshift_var_lib_t, openshift_var_lib_t)
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Create, read, write, and delete
|
|
|
45a090d |
## openshift lib files.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_manage_lib_files',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_var_lib_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
files_search_var_lib($1)
|
|
|
82bef4c |
manage_files_pattern($1, openshift_var_lib_t, openshift_var_lib_t)
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Manage openshift lib dirs files.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_manage_lib_dirs',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_var_lib_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
files_search_var_lib($1)
|
|
|
82bef4c |
manage_dirs_pattern($1, openshift_var_lib_t, openshift_var_lib_t)
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
5d5c6b1 |
#######################################
|
|
|
5d5c6b1 |
## <summary>
|
|
|
5d5c6b1 |
## Create private objects in the
|
|
|
5d5c6b1 |
## mail lib directory.
|
|
|
5d5c6b1 |
## </summary>
|
|
|
5d5c6b1 |
## <param name="domain">
|
|
|
5d5c6b1 |
## <summary>
|
|
|
5d5c6b1 |
## Domain allowed access.
|
|
|
5d5c6b1 |
## </summary>
|
|
|
5d5c6b1 |
## </param>
|
|
|
5d5c6b1 |
## <param name="private type">
|
|
|
5d5c6b1 |
## <summary>
|
|
|
5d5c6b1 |
## The type of the object to be created.
|
|
|
5d5c6b1 |
## </summary>
|
|
|
5d5c6b1 |
## </param>
|
|
|
5d5c6b1 |
## <param name="object">
|
|
|
5d5c6b1 |
## <summary>
|
|
|
5d5c6b1 |
## The object class of the object being created.
|
|
|
5d5c6b1 |
## </summary>
|
|
|
5d5c6b1 |
## </param>
|
|
|
5d5c6b1 |
## <param name="name" optional="true">
|
|
|
5d5c6b1 |
## <summary>
|
|
|
5d5c6b1 |
## The name of the object being created.
|
|
|
5d5c6b1 |
## </summary>
|
|
|
5d5c6b1 |
## </param>
|
|
|
5d5c6b1 |
#
|
|
|
5d5c6b1 |
interface(`openshift_lib_filetrans',`
|
|
|
5d5c6b1 |
gen_require(`
|
|
|
5d5c6b1 |
type openshift_var_lib_t;
|
|
|
5d5c6b1 |
')
|
|
|
5d5c6b1 |
|
|
|
3c7ab04 |
files_search_var_lib($1)
|
|
|
5d5c6b1 |
filetrans_pattern($1, openshift_var_lib_t, $2, $3, $4)
|
|
|
5d5c6b1 |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Read openshift PID files.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_read_pid_files',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_var_run_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
files_search_pids($1)
|
|
|
45a090d |
allow $1 openshift_var_run_t:file read_file_perms;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## All of the rules required to administrate
|
|
|
45a090d |
## an openshift environment
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
## <param name="role">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Role allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
## <rolecap/>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_admin',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_t;
|
|
|
45a090d |
type openshift_initrc_exec_t;
|
|
|
82bef4c |
type openshift_cache_t;
|
|
|
82bef4c |
type openshift_log_t;
|
|
|
82bef4c |
type openshift_var_lib_t;
|
|
|
82bef4c |
type openshift_var_run_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
allow $1 openshift_t:process { ptrace signal_perms };
|
|
|
45a090d |
ps_process_pattern($1, openshift_t)
|
|
|
45a090d |
|
|
|
45a090d |
openshift_initrc_domtrans($1)
|
|
|
45a090d |
domain_system_change_exemption($1)
|
|
|
45a090d |
role_transition $2 openshift_initrc_exec_t system_r;
|
|
|
45a090d |
allow $2 system_r;
|
|
|
45a090d |
|
|
|
45a090d |
files_search_var($1)
|
|
|
45a090d |
admin_pattern($1, openshift_cache_t)
|
|
|
45a090d |
|
|
|
45a090d |
logging_search_logs($1)
|
|
|
45a090d |
admin_pattern($1, openshift_log_t)
|
|
|
45a090d |
|
|
|
45a090d |
files_search_var_lib($1)
|
|
|
45a090d |
admin_pattern($1, openshift_var_lib_t)
|
|
|
45a090d |
|
|
|
45a090d |
files_search_pids($1)
|
|
|
45a090d |
admin_pattern($1, openshift_var_run_t)
|
|
|
45a090d |
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Make the specified type usable as a openshift domain.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="openshiftdomain_prefix">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## The prefix of the domain (e.g., openshift
|
|
|
45a090d |
## is the prefix for openshift_t).
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
template(`openshift_service_domain_template',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
attribute openshift_domain;
|
|
|
45a090d |
attribute openshift_user_domain;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
82bef4c |
type $1_t;
|
|
|
82bef4c |
typeattribute $1_t openshift_domain, openshift_user_domain;
|
|
|
45a090d |
domain_type($1_t)
|
|
|
45a090d |
role system_r types $1_t;
|
|
|
1f86dac |
mcs_constrained($1_t)
|
|
|
45a090d |
domain_user_exemption_target($1_t)
|
|
|
45a090d |
auth_use_nsswitch($1_t)
|
|
|
0d71423 |
domain_subj_id_change_exemption($1_t)
|
|
|
45a090d |
domain_obj_id_change_exemption($1_t)
|
|
|
1651029 |
domain_dyntrans_type($1_t)
|
|
|
45a090d |
|
|
|
1bafb67 |
kernel_read_system_state($1_t)
|
|
|
1bafb67 |
|
|
|
ab85b47 |
logging_send_syslog_msg($1_t)
|
|
|
05b4f84 |
|
|
|
82bef4c |
type $1_app_t;
|
|
|
82bef4c |
typeattribute $1_app_t openshift_domain;
|
|
|
45a090d |
domain_type($1_app_t)
|
|
|
45a090d |
role system_r types $1_app_t;
|
|
|
1f86dac |
mcs_constrained($1_app_t)
|
|
|
45a090d |
domain_user_exemption_target($1_app_t)
|
|
|
45a090d |
domain_obj_id_change_exemption($1_app_t)
|
|
|
1651029 |
domain_dyntrans_type($1_app_t)
|
|
|
05b4f84 |
|
|
|
1bafb67 |
kernel_read_system_state($1_app_t)
|
|
|
1bafb67 |
|
|
|
05b4f84 |
logging_send_syslog_msg($1_app_t)
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Make the specified type usable as a openshift domain.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="type">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Type to be used as a openshift domain type.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
template(`openshift_net_type',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
attribute openshift_net_domain;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
088ad3a |
typeattribute $1 openshift_net_domain;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Read and write inherited openshift files.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_rw_inherited_content',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
attribute openshift_file_type;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
allow $1 openshift_file_type:file rw_inherited_file_perms;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Manage openshift tmp files.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_manage_tmp_files',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_tmp_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
manage_files_pattern($1, openshift_tmp_t, openshift_tmp_t)
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Manage openshift tmp sockets.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_manage_tmp_sockets',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_tmp_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
manage_sock_files_pattern($1, openshift_tmp_t, openshift_tmp_t)
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Mounton openshift tmp directory.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_mounton_tmp',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_tmp_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
allow $1 openshift_tmp_t:dir mounton;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Dontaudit Read and write inherited script fifo files.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_dontaudit_rw_inherited_fifo_files',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_initrc_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
dontaudit $1 openshift_initrc_t:fifo_file rw_inherited_fifo_file_perms;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Allow calling app to transition to an openshift domain
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
## <rolecap/>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_transition',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
attribute openshift_user_domain;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
allow $1 openshift_user_domain:process transition;
|
|
|
45a090d |
dontaudit $1 openshift_user_domain:process { noatsecure siginh rlimitinh };
|
|
|
45a090d |
allow openshift_user_domain $1:fd use;
|
|
|
45a090d |
allow openshift_user_domain $1:fifo_file rw_inherited_fifo_file_perms;
|
|
|
45a090d |
allow openshift_user_domain $1:process sigchld;
|
|
|
45a090d |
dontaudit $1 openshift_user_domain:socket_class_set { read write };
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Allow calling app to transition to an openshift domain
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed access
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
## <rolecap/>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_dyntransition',`
|
|
|
45a090d |
gen_require(`
|
|
|
b4857f0 |
attribute openshift_domain;
|
|
|
45a090d |
attribute openshift_user_domain;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
allow $1 openshift_user_domain:process dyntransition;
|
|
|
45a090d |
dontaudit openshift_user_domain $1:key view;
|
|
|
45a090d |
allow openshift_user_domain $1:unix_stream_socket { connectto rw_socket_perms };
|
|
|
45a090d |
allow openshift_user_domain $1:unix_dgram_socket rw_socket_perms;
|
|
|
45a090d |
allow $1 openshift_user_domain:process { rlimitinh signal };
|
|
|
45a090d |
dontaudit openshift_domain $1:tcp_socket { read write getattr setopt getopt shutdown };
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
########################################
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Execute openshift in the openshift domain, and
|
|
|
45a090d |
## allow the specified role the openshift domain.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## <param name="domain">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Domain allowed to transition.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
## <param name="role">
|
|
|
45a090d |
## <summary>
|
|
|
45a090d |
## Role allowed access.
|
|
|
45a090d |
## </summary>
|
|
|
45a090d |
## </param>
|
|
|
45a090d |
#
|
|
|
45a090d |
interface(`openshift_run',`
|
|
|
45a090d |
gen_require(`
|
|
|
45a090d |
type openshift_initrc_exec_t;
|
|
|
45a090d |
')
|
|
|
45a090d |
|
|
|
45a090d |
openshift_initrc_domtrans($1)
|
|
|
45a090d |
role_transition $2 openshift_initrc_exec_t system_r;
|
|
|
45a090d |
openshift_transition($1)
|
|
|
45a090d |
')
|