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