Chris PeBenito 21468a
Chris PeBenito 21468a
policy_module(loadkeys,1.0)
Chris PeBenito 21468a
Chris PeBenito 21468a
########################################
Chris PeBenito 21468a
#
Chris PeBenito 21468a
# Declarations
Chris PeBenito 21468a
#
Chris PeBenito 21468a
Chris PeBenito 9e9138
ifdef(`targeted_policy',`
Chris PeBenito 9e9138
	# for compatibility with strict:
Chris PeBenito 9e9138
	corecmd_bin_alias(loadkeys_exec_t)
Chris PeBenito 9e9138
',`
Chris PeBenito 9e9138
	# cjp: this should probably be rewritten
Chris PeBenito 9e9138
	# per user domain, since it can rw
Chris PeBenito 9e9138
	# all user domain ttys
Chris PeBenito 21468a
Chris PeBenito 9e9138
	type loadkeys_t;
Chris PeBenito 9e9138
	domain_type(loadkeys_t)
Chris PeBenito 21468a
Chris PeBenito 9e9138
	type loadkeys_exec_t;
Chris PeBenito 9e9138
	domain_entry_file(loadkeys_t,loadkeys_exec_t)
Chris PeBenito 9e9138
')
Chris PeBenito 21468a
Chris PeBenito 21468a
########################################
Chris PeBenito 21468a
#
Chris PeBenito 21468a
# Local policy
Chris PeBenito 21468a
#
Chris PeBenito 21468a
Chris PeBenito 9e9138
ifdef(`targeted_policy',`
Chris PeBenito 9e9138
	# loadkeys domain disabled in targeted policy
Chris PeBenito 9e9138
',`
Chris PeBenito 9e9138
	allow loadkeys_t self:capability { setuid sys_tty_config };
Chris PeBenito 9e9138
	allow loadkeys_t self:fifo_file rw_file_perms;
Chris PeBenito 21468a
Chris PeBenito 9e9138
	kernel_read_system_state(loadkeys_t)
Chris PeBenito 21468a
Chris PeBenito 9e9138
	corecmd_exec_bin(loadkeys_t)
Chris PeBenito 9e9138
	corecmd_exec_shell(loadkeys_t)
Chris PeBenito 21468a
Chris PeBenito 9e9138
	files_dontaudit_read_etc_runtime_files(loadkeys_t)
Chris PeBenito 21468a
Chris PeBenito 9e9138
	libs_use_ld_so(loadkeys_t)
Chris PeBenito 9e9138
	libs_use_shared_libs(loadkeys_t)
Chris PeBenito 21468a
Chris PeBenito 9e9138
	locallogin_use_fd(loadkeys_t)
Chris PeBenito 21468a
Chris PeBenito 9e9138
	miscfiles_read_localization(loadkeys_t)
Chris PeBenito 9e9138
')