##
## Determine of the console connected to the controlling terminal.
##
########################################
##
## Execute consoletype in the consoletype domain.
##
##
##
## The type of the process performing this action.
##
##
#
interface(`consoletype_domtrans',`
gen_require(`
type consoletype_t, consoletype_exec_t;
')
corecmd_search_sbin($1)
domtrans_pattern($1,consoletype_exec_t,consoletype_t)
')
########################################
##
## Execute consoletype in the consoletype domain, and
## allow the specified role the consoletype domain.
##
##
##
## The type of the process performing this action.
##
##
##
##
## The role to be allowed the consoletype domain.
##
##
##
##
## The type of the terminal allow the consoletype domain to use.
##
##
#
interface(`consoletype_run',`
gen_require(`
type consoletype_t;
')
consoletype_domtrans($1)
role $2 types consoletype_t;
allow consoletype_t $3:chr_file rw_term_perms;
')
########################################
##
## Execute consoletype in the caller domain.
##
##
##
## The type of the process performing this action.
##
##
##
#
interface(`consoletype_exec',`
gen_require(`
type consoletype_exec_t;
')
corecmd_search_sbin($1)
can_exec($1,consoletype_exec_t)
')