Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Macros for iceauth domains.
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Author:  Ivan Gyurdiev <gyurdiev@redhat.com>
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# iceauth_domain(domain_prefix)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
define(`iceauth_domain',`
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Program type
Chris PeBenito ab58ad
type $1_iceauth_t, domain;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Transition from the user domain to this domain.
Chris PeBenito ab58ad
domain_auto_trans($1_t, iceauth_exec_t, $1_iceauth_t)
Chris PeBenito ab58ad
role $1_r types $1_iceauth_t;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Store .ICEauthority files
Chris PeBenito ab58ad
home_domain($1, iceauth)
Chris PeBenito ab58ad
file_type_auto_trans($1_iceauth_t, $1_home_dir_t, $1_iceauth_home_t, file)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Supress xdm trying to restore .ICEauthority permissions
Chris PeBenito ab58ad
ifdef(`xdm.te', `
Chris PeBenito ab58ad
dontaudit xdm_t $1_iceauth_home_t:file r_file_perms;
Chris PeBenito ab58ad
')
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# /root
Chris PeBenito ab58ad
allow $1_iceauth_t root_t:dir search;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Terminal output
Chris PeBenito ab58ad
access_terminal($1_iceauth_t, $1)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
uses_shlib($1_iceauth_t)
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# ??? 
Chris PeBenito ab58ad
allow $1_iceauth_t etc_t:dir search;
Chris PeBenito ab58ad
allow $1_iceauth_t usr_t:dir search;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# FIXME: policy is incomplete
Chris PeBenito ab58ad
Chris PeBenito ab58ad
')dnl end xauth_domain macro