## policy for jockey
########################################
##
## Transition to jockey.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`jockey_domtrans',`
gen_require(`
type jockey_t, jockey_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, jockey_exec_t, jockey_t)
')
########################################
##
## Search jockey cache directories.
##
##
##
## Domain allowed access.
##
##
#
interface(`jockey_search_cache',`
gen_require(`
type jockey_cache_t;
')
allow $1 jockey_cache_t:dir search_dir_perms;
files_search_var($1)
')
########################################
##
## Read jockey cache files.
##
##
##
## Domain allowed access.
##
##
#
interface(`jockey_read_cache_files',`
gen_require(`
type jockey_cache_t;
')
files_search_var($1)
read_files_pattern($1, jockey_cache_t, jockey_cache_t)
')
########################################
##
## Create, read, write, and delete
## jockey cache files.
##
##
##
## Domain allowed access.
##
##
#
interface(`jockey_manage_cache_files',`
gen_require(`
type jockey_cache_t;
')
files_search_var($1)
manage_files_pattern($1, jockey_cache_t, jockey_cache_t)
')
########################################
##
## Manage jockey cache dirs.
##
##
##
## Domain allowed access.
##
##
#
interface(`jockey_manage_cache_dirs',`
gen_require(`
type jockey_cache_t;
')
files_search_var($1)
manage_dirs_pattern($1, jockey_cache_t, jockey_cache_t)
')
########################################
##
## All of the rules required to administrate
## an jockey environment
##
##
##
## Domain allowed access.
##
##
#
interface(`jockey_admin',`
gen_require(`
type jockey_t;
type jockey_cache_t;
type jockey_var_log_t;
')
allow $1 jockey_t:process { ptrace signal_perms };
ps_process_pattern($1, jockey_t)
files_search_var($1)
admin_pattern($1, jockey_cache_t)
logging_search_logs($1)
admin_pattern($1, jockey_var_log_t)
optional_policy(`
systemd_passwd_agent_exec($1)
systemd_read_fifo_file_passwd_run($1)
')
')