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