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