selinux-policy/policy/modules/admin/consoletype.if
2007-03-23 23:24:59 +00:00

74 lines
1.6 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_bin($1)
domtrans_pattern($1,consoletype_exec_t,consoletype_t)
')
########################################
## <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>
## <rolecap/>
#
interface(`consoletype_exec',`
gen_require(`
type consoletype_exec_t;
')
corecmd_search_bin($1)
can_exec($1,consoletype_exec_t)
')