Blob Blame History Raw
## <summary>Load keyboard mappings.</summary>

########################################
## <summary>
##	Execute the loadkeys program in the loadkeys domain.
## </summary>
## <param name="domain">
##	The type of the process performing this action.
## </param>
#
interface(`loadkeys_domtrans',`
	gen_require(`
		type loadkeys_t, loadkeys_exec_t;
		class process sigchld;
		class fd use;
		class fifo_file rw_file_perms;
	')

	corecmd_search_bin($1)
	domain_auto_trans($1, loadkeys_exec_t, loadkeys_t)

	allow $1 loadkeys_t:fd use;
	allow loadkeys_t $1:fd use;
	allow loadkeys_t $1:fifo_file rw_file_perms;
	allow loadkeys_t $1:process sigchld;
')

########################################
## <summary>
##	Execute the loadkeys program in the loadkeys domain.
## </summary>
## <param name="domain">
##	The type of the process performing this action.
## </param>
## <param name="role">
##	The role to allow the loadkeys domain.
## </param>
## <param name="terminal">
##	The type of the terminal allow the loadkeys domain to use.
## </param>
#
interface(`loadkeys_run',`
	gen_require(`
		type loadkeys_t;
		class chr_file rw_term_perms;
	')

	loadkeys_domtrans($1)
	role $2 types loadkeys_t;
	allow loadkeys_t $3:chr_file rw_term_perms;
')

########################################
## <summary>
##	Execute the loadkeys program in the caller domain.
## </summary>
## <param name="domain">
##	The type of the process performing this action.
## </param>
#
interface(`loadkeys_exec',`
	gen_require(`
		type loadkeys_exec_t;
	')

	can_exec($1,loadkeys_exec_t)
')