78 lines
1.7 KiB
Plaintext
78 lines
1.7 KiB
Plaintext
## <summary>
|
|
## Determine of the console connected to the controlling terminal.
|
|
## </summary>
|
|
|
|
########################################
|
|
## <summary>
|
|
## Execute consoletype in the consoletype domain.
|
|
## </summary>
|
|
## <param name="domain">
|
|
## <summary>
|
|
## The type of the process performing this action.
|
|
## </summary>
|
|
## </param>
|
|
#
|
|
interface(`consoletype_domtrans',`
|
|
gen_require(`
|
|
type consoletype_t, consoletype_exec_t;
|
|
')
|
|
|
|
corecmd_search_sbin($1)
|
|
domain_auto_trans($1,consoletype_exec_t,consoletype_t)
|
|
|
|
allow $1 consoletype_t:fd use;
|
|
allow consoletype_t $1:fd use;
|
|
allow consoletype_t $1:fifo_file rw_file_perms;
|
|
allow consoletype_t $1:process sigchld;
|
|
')
|
|
|
|
########################################
|
|
## <summary>
|
|
## Execute consoletype in the consoletype domain, and
|
|
## allow the specified role the consoletype domain.
|
|
## </summary>
|
|
## <param name="domain">
|
|
## <summary>
|
|
## The type of the process performing this action.
|
|
## </summary>
|
|
## </param>
|
|
## <param name="role">
|
|
## <summary>
|
|
## The role to be allowed the consoletype domain.
|
|
## </summary>
|
|
## </param>
|
|
## <param name="terminal">
|
|
## <summary>
|
|
## The type of the terminal allow the consoletype domain to use.
|
|
## </summary>
|
|
## </param>
|
|
#
|
|
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;
|
|
')
|
|
|
|
########################################
|
|
## <summary>
|
|
## Execute consoletype in the caller domain.
|
|
## </summary>
|
|
## <param name="domain">
|
|
## <summary>
|
|
## The type of the process performing this action.
|
|
## </summary>
|
|
## </param>
|
|
#
|
|
interface(`consoletype_exec',`
|
|
gen_require(`
|
|
type consoletype_exec_t;
|
|
')
|
|
|
|
corecmd_search_sbin($1)
|
|
can_exec($1,consoletype_exec_t)
|
|
')
|