Chris PeBenito 21468a
## <summary>Load keyboard mappings.</summary>
Chris PeBenito 21468a
Chris PeBenito 21468a
########################################
Chris PeBenito 21468a
## <summary>
Chris PeBenito 21468a
##	Execute the loadkeys program in the loadkeys domain.
Chris PeBenito 21468a
## </summary>
Chris PeBenito 21468a
## <param name="domain">
Chris PeBenito 21468a
##	The type of the process performing this action.
Chris PeBenito 21468a
## </param>
Chris PeBenito 21468a
#
Chris PeBenito 21468a
interface(`loadkeys_domtrans',`
Chris PeBenito 9e9138
	ifdef(`targeted_policy',`
Chris PeBenito 9e9138
		# $0(): disabled in targeted policy as there
Chris PeBenito 9e9138
		# is no loadkeys domain.
Chris PeBenito 9e9138
	',`
Chris PeBenito 9e9138
		gen_require(`
Chris PeBenito 9e9138
			type loadkeys_t, loadkeys_exec_t;
Chris PeBenito 9e9138
		')
Chris PeBenito 21468a
Chris PeBenito 9e9138
		corecmd_search_bin($1)
Chris PeBenito 9e9138
		domain_auto_trans($1, loadkeys_exec_t, loadkeys_t)
Chris PeBenito 21468a
Chris PeBenito 9e9138
		allow $1 loadkeys_t:fd use;
Chris PeBenito 9e9138
		allow loadkeys_t $1:fd use;
Chris PeBenito 9e9138
		allow loadkeys_t $1:fifo_file rw_file_perms;
Chris PeBenito 9e9138
		allow loadkeys_t $1:process sigchld;
Chris PeBenito 9e9138
	')
Chris PeBenito 21468a
')
Chris PeBenito 21468a
Chris PeBenito 21468a
########################################
Chris PeBenito 21468a
## <summary>
Chris PeBenito 21468a
##	Execute the loadkeys program in the loadkeys domain.
Chris PeBenito 21468a
## </summary>
Chris PeBenito 21468a
## <param name="domain">
Chris PeBenito 21468a
##	The type of the process performing this action.
Chris PeBenito 21468a
## </param>
Chris PeBenito 21468a
## <param name="role">
Chris PeBenito 21468a
##	The role to allow the loadkeys domain.
Chris PeBenito 21468a
## </param>
Chris PeBenito 21468a
## <param name="terminal">
Chris PeBenito 21468a
##	The type of the terminal allow the loadkeys domain to use.
Chris PeBenito 21468a
## </param>
Chris PeBenito 21468a
#
Chris PeBenito 21468a
interface(`loadkeys_run',`
Chris PeBenito 9e9138
	ifdef(`targeted_policy',`
Chris PeBenito 9e9138
		# $0(): disabled in targeted policy as there
Chris PeBenito 9e9138
		# is no loadkeys domain.
Chris PeBenito 9e9138
	',`
Chris PeBenito 9e9138
		gen_require(`
Chris PeBenito 9e9138
			type loadkeys_t;
Chris PeBenito 9e9138
		')
Chris PeBenito 21468a
Chris PeBenito 9e9138
		loadkeys_domtrans($1)
Chris PeBenito 9e9138
		role $2 types loadkeys_t;
Chris PeBenito 9e9138
		allow loadkeys_t $3:chr_file rw_term_perms;
Chris PeBenito 9e9138
	')
Chris PeBenito 21468a
')
Chris PeBenito 21468a
Chris PeBenito 21468a
########################################
Chris PeBenito 21468a
## <summary>
Chris PeBenito 21468a
##	Execute the loadkeys program in the caller domain.
Chris PeBenito 21468a
## </summary>
Chris PeBenito 21468a
## <param name="domain">
Chris PeBenito 21468a
##	The type of the process performing this action.
Chris PeBenito 21468a
## </param>
Chris PeBenito 21468a
#
Chris PeBenito 21468a
interface(`loadkeys_exec',`
Chris PeBenito 9e9138
	ifdef(`targeted_policy',`
Chris PeBenito 9e9138
		# $0(): the loadkeys program is an alias
Chris PeBenito 9e9138
		# of generic bin programs.
Chris PeBenito 9e9138
		corecmd_exec_bin($1)
Chris PeBenito 9e9138
	',`
Chris PeBenito 9e9138
		gen_require(`
Chris PeBenito 9e9138
			type loadkeys_exec_t;
Chris PeBenito 9e9138
		')
Chris PeBenito 21468a
Chris PeBenito 9e9138
		can_exec($1,loadkeys_exec_t)
Chris PeBenito 9e9138
	')
Chris PeBenito 21468a
')