## TSS Core Services daemon.
########################################
##
## Execute a domain transition to run tcsd.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`tcsd_domtrans',`
gen_require(`
type tcsd_t, tcsd_exec_t;
')
corecmd_search_bin($1)
domtrans_pattern($1, tcsd_exec_t, tcsd_t)
')
########################################
##
## Execute tcsd init scripts in the
## initrc domain.
##
##
##
## Domain allowed to transition.
##
##
#
interface(`tcsd_initrc_domtrans',`
gen_require(`
type tcsd_initrc_exec_t;
')
init_labeled_script_domtrans($1, tcsd_initrc_exec_t)
')
########################################
##
## Search tcsd lib directories.
##
##
##
## Domain allowed access.
##
##
#
interface(`tcsd_search_lib',`
gen_require(`
type tcsd_var_lib_t;
')
files_search_var_lib($1)
allow $1 tcsd_var_lib_t:dir search_dir_perms;
')
########################################
##
## Create, read, write, and delete
## tcsd lib directories.
##
##
##
## Domain allowed access.
##
##
#
interface(`tcsd_manage_lib_dirs',`
gen_require(`
type tcsd_var_lib_t;
')
files_search_var_lib($1)
manage_dirs_pattern($1, tcsd_var_lib_t, tcsd_var_lib_t)
')
########################################
##
## Read tcsd lib files.
##
##
##
## Domain allowed access.
##
##
#
interface(`tcsd_read_lib_files',`
gen_require(`
type tcsd_var_lib_t;
')
files_search_var_lib($1)
read_files_pattern($1, tcsd_var_lib_t, tcsd_var_lib_t)
')
########################################
##
## Create, read, write, and delete
## tcsd lib files.
##
##
##
## Domain allowed access.
##
##
#
interface(`tcsd_manage_lib_files',`
gen_require(`
type tcsd_var_lib_t;
')
files_search_var_lib($1)
manage_files_pattern($1, tcsd_var_lib_t, tcsd_var_lib_t)
')
########################################
##
## All of the rules required to
## administrate an tcsd environment.
##
##
##
## Domain allowed access.
##
##
##
##
## Role allowed access.
##
##
##
#
interface(`tcsd_admin',`
gen_require(`
type tcsd_t, tcsd_initrc_exec_t, tcsd_var_lib_t;
')
allow $1 tcsd_t:process signal_perms;
ps_process_pattern($1, tcsd_t)
tunable_policy(`deny_ptrace',`',`
allow $1 tcsd_t:process ptrace;
')
tcsd_initrc_domtrans($1)
domain_system_change_exemption($1)
role_transition $2 tcsd_initrc_exec_t system_r;
allow $2 system_r;
files_search_var_lib($1)
admin_pattern($1, tcsd_var_lib_t)
')