Chris PeBenito 31b7c0
#DESC loadkeys - for changing to unicode at login time
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Author:  Russell Coker <russell@coker.com.au>
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# X-Debian-Packages: console-tools
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# loadkeys_exec_t is the type of the wrapper
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
type loadkeys_exec_t, file_type, sysadmfile, exec_type;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
can_exec(initrc_t, loadkeys_exec_t)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Derived domain based on the calling user domain and the program.
Chris PeBenito 31b7c0
type loadkeys_t, domain;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Transition from the user domain to this domain.
Chris PeBenito 31b7c0
domain_auto_trans(unpriv_userdomain, loadkeys_exec_t, loadkeys_t)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
uses_shlib(loadkeys_t)
Chris PeBenito 31b7c0
dontaudit loadkeys_t proc_t:dir search;
Chris PeBenito 31b7c0
allow loadkeys_t proc_t:file { getattr read };
Chris PeBenito 31b7c0
allow loadkeys_t self:process { fork sigchld };
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
allow loadkeys_t self:fifo_file rw_file_perms;
Chris PeBenito 31b7c0
allow loadkeys_t bin_t:dir search;
Chris PeBenito 31b7c0
allow loadkeys_t bin_t:lnk_file read;
Chris PeBenito 31b7c0
can_exec(loadkeys_t, { shell_exec_t bin_t })
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
read_locale(loadkeys_t)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
dontaudit loadkeys_t etc_runtime_t:file { getattr read };
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Use capabilities.
Chris PeBenito 31b7c0
allow loadkeys_t self:capability { setuid sys_tty_config };
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
allow loadkeys_t local_login_t:fd use;
Chris PeBenito 31b7c0
allow loadkeys_t devtty_t:chr_file rw_file_perms;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# The user role is authorized for this domain.
Chris PeBenito 31b7c0
in_user_role(loadkeys_t)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Write to the user domain tty.
Chris PeBenito 31b7c0
allow loadkeys_t ttyfile:chr_file rw_file_perms;
Chris PeBenito 31b7c0