Chris PeBenito 0fbfa5
#DESC lcd - program for Cobalt LCD device
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Author:  Russell Coker <russell@coker.com.au>
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
#################################
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# Rules for the lcd_t domain.
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
# lcd_t is the domain for the lcd program.
Chris PeBenito 0fbfa5
# lcd_exec_t is the type of the corresponding program.
Chris PeBenito 0fbfa5
#
Chris PeBenito 0fbfa5
type lcd_t, domain, privlog;
Chris PeBenito 0fbfa5
role sysadm_r types lcd_t;
Chris PeBenito 0fbfa5
role system_r types lcd_t;
Chris PeBenito 0fbfa5
uses_shlib(lcd_t)
Chris PeBenito 0fbfa5
type lcd_exec_t, file_type, sysadmfile, exec_type;
Chris PeBenito 0fbfa5
type lcd_device_t, file_type;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Transition into this domain when you run this program.
Chris PeBenito 0fbfa5
domain_auto_trans(initrc_t, lcd_exec_t, lcd_t)
Chris PeBenito 0fbfa5
domain_auto_trans(sysadm_t, lcd_exec_t, lcd_t)
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
allow lcd_t lcd_device_t:chr_file rw_file_perms;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# for /etc/locks/.lcd_lock
Chris PeBenito 0fbfa5
lock_domain(lcd)
Chris PeBenito 0fbfa5
allow lcd_t etc_t:lnk_file read;
Chris PeBenito 0fbfa5
allow lcd_t var_t:dir search;
Chris PeBenito 0fbfa5
Chris PeBenito 0fbfa5
# Access the terminal.
Chris PeBenito 0fbfa5
allow lcd_t admin_tty_type:chr_file rw_file_perms;
Chris PeBenito 0fbfa5
ifdef(`gnome-pty-helper.te', `allow lcd_t sysadm_gph_t:fd use;')
Chris PeBenito 0fbfa5
allow lcd_t privfd:fd use;
Chris PeBenito 0fbfa5