2005-08-15 14:46:17 +00:00
|
|
|
## <summary>Load keyboard mappings.</summary>
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute the loadkeys program in the loadkeys domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-15 14:46:17 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-15 14:46:17 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`loadkeys_domtrans',`
|
2006-08-03 18:02:28 +00:00
|
|
|
ifdef(`strict_policy',`
|
2005-11-14 20:26:41 +00:00
|
|
|
gen_require(`
|
|
|
|
type loadkeys_t, loadkeys_exec_t;
|
|
|
|
')
|
2005-08-15 14:46:17 +00:00
|
|
|
|
2005-11-14 20:26:41 +00:00
|
|
|
corecmd_search_bin($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
domtrans_pattern($1, loadkeys_exec_t, loadkeys_t)
|
2006-08-03 18:02:28 +00:00
|
|
|
',`
|
|
|
|
refpolicywarn(`$0($*) has no effect in targeted policy.')
|
2005-11-14 20:26:41 +00:00
|
|
|
')
|
2005-08-15 14:46:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute the loadkeys program in the loadkeys domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-15 14:46:17 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-15 14:46:17 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-15 14:46:17 +00:00
|
|
|
## The role to allow the loadkeys domain.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-15 14:46:17 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="terminal">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-15 14:46:17 +00:00
|
|
|
## The type of the terminal allow the loadkeys domain to use.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-15 14:46:17 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-08-15 14:46:17 +00:00
|
|
|
#
|
|
|
|
interface(`loadkeys_run',`
|
2005-11-14 20:26:41 +00:00
|
|
|
ifdef(`targeted_policy',`
|
|
|
|
# $0(): disabled in targeted policy as there
|
|
|
|
# is no loadkeys domain.
|
|
|
|
',`
|
|
|
|
gen_require(`
|
|
|
|
type loadkeys_t;
|
|
|
|
')
|
2005-08-15 14:46:17 +00:00
|
|
|
|
2005-11-14 20:26:41 +00:00
|
|
|
loadkeys_domtrans($1)
|
|
|
|
role $2 types loadkeys_t;
|
|
|
|
allow loadkeys_t $3:chr_file rw_term_perms;
|
|
|
|
')
|
2005-08-15 14:46:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute the loadkeys program in the caller domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-15 14:46:17 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-15 14:46:17 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`loadkeys_exec',`
|
2005-11-14 20:26:41 +00:00
|
|
|
ifdef(`targeted_policy',`
|
|
|
|
# $0(): the loadkeys program is an alias
|
|
|
|
# of generic bin programs.
|
|
|
|
corecmd_exec_bin($1)
|
|
|
|
',`
|
|
|
|
gen_require(`
|
|
|
|
type loadkeys_exec_t;
|
|
|
|
')
|
2005-08-15 14:46:17 +00:00
|
|
|
|
2005-11-14 20:26:41 +00:00
|
|
|
can_exec($1,loadkeys_exec_t)
|
|
|
|
')
|
2005-08-15 14:46:17 +00:00
|
|
|
')
|