Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Macros for tvtime domains.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Author: Dan Walsh <dwalsh@redhat.com>
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# tvtime_domain(domain_prefix)
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# Define a derived domain for the tvtime program when executed
Chris PeBenito 31b7c0
# by a user domain.
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
# The type declaration for the executable type for this program is
Chris PeBenito 31b7c0
# provided separately in domains/program/tvtime.te. 
Chris PeBenito 31b7c0
#
Chris PeBenito 31b7c0
undefine(`tvtime_domain')
Chris PeBenito 31b7c0
ifdef(`tvtime.te', `
Chris PeBenito 31b7c0
define(`tvtime_domain',`
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Type transition
Chris PeBenito 31b7c0
type $1_tvtime_t, domain, nscd_client_domain;
Chris PeBenito 31b7c0
domain_auto_trans($1_t, tvtime_exec_t, $1_tvtime_t)
Chris PeBenito 31b7c0
role $1_r types $1_tvtime_t;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# X access, Home files
Chris PeBenito 31b7c0
home_domain($1, tvtime)
Chris PeBenito 31b7c0
file_type_auto_trans($1_tvtime_t, $1_home_dir_t, $1_tvtime_home_t, dir)
Chris PeBenito 31b7c0
x_client_domain($1_tvtime, $1)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
uses_shlib($1_tvtime_t)
Chris PeBenito 31b7c0
read_locale($1_tvtime_t)
Chris PeBenito 31b7c0
read_sysctl($1_tvtime_t)
Chris PeBenito 31b7c0
access_terminal($1_tvtime_t, $1)
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Allow the user domain to signal/ps.
Chris PeBenito 31b7c0
can_ps($1_t, $1_tvtime_t)
Chris PeBenito 31b7c0
allow $1_t $1_tvtime_t:process signal_perms;
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Read /etc/tvtime
Chris PeBenito 31b7c0
allow $1_tvtime_t etc_t:file { getattr read };
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
# Tmp files
Chris PeBenito 31b7c0
tmp_domain($1_tvtime, `', `{ file dir fifo_file }')
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
allow $1_tvtime_t urandom_device_t:chr_file read;
Chris PeBenito 31b7c0
allow $1_tvtime_t clock_device_t:chr_file { ioctl read };
Chris PeBenito 31b7c0
allow $1_tvtime_t kernel_t:system ipc_info;
Chris PeBenito 31b7c0
allow $1_tvtime_t sound_device_t:chr_file { ioctl read };
Chris PeBenito 31b7c0
allow $1_tvtime_t $1_home_t:dir { getattr read search };
Chris PeBenito 31b7c0
allow $1_tvtime_t $1_home_t:file { getattr read };
Chris PeBenito 31b7c0
allow $1_tvtime_t self:capability { setuid sys_nice sys_resource };
Chris PeBenito 31b7c0
allow $1_tvtime_t self:process setsched;
Chris PeBenito 31b7c0
allow $1_tvtime_t usr_t:file { getattr read };
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
')dnl end tvtime_domain
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
', `
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
define(`tvtime_domain',`')
Chris PeBenito 31b7c0
Chris PeBenito 31b7c0
')
Chris PeBenito 31b7c0