Chris PeBenito ab58ad
##############################
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Assertions for the type enforcement (TE) configuration.
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Authors:  Stephen Smalley <sds@epoch.ncsc.mil> and Timothy Fraser  
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
Chris PeBenito ab58ad
##################################
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Access vector assertions.
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# An access vector assertion specifies permissions that should not be in
Chris PeBenito ab58ad
# an access vector based on a source type, a target type, and a class.
Chris PeBenito ab58ad
# If any of the specified permissions are in the corresponding access
Chris PeBenito ab58ad
# vector, then the policy compiler will reject the policy configuration.
Chris PeBenito ab58ad
# Currently, there is only one kind of access vector assertion, neverallow, 
Chris PeBenito ab58ad
# but support for the other kinds of vectors could be easily added.  Access 
Chris PeBenito ab58ad
# vector assertions use the same syntax as access vector rules.
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Confined domains must never touch an unconfined domain except to
Chris PeBenito ab58ad
# send SIGCHLD for child termination notifications.
Chris PeBenito ab58ad
neverallow { domain -unrestricted -unconfinedtrans -snmpd_t } unconfined_t:process ~sigchld;
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# Confined domains must never see /proc/pid entries for an unconfined domain.
Chris PeBenito ab58ad
neverallow { domain -unrestricted -snmpd_t } unconfined_t:dir { getattr search };
Chris PeBenito ab58ad
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Verify that every type that can be entered by
Chris PeBenito ab58ad
# a domain is also tagged as a domain.
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
neverallow domain ~domain:process { transition dyntransition};
Chris PeBenito ab58ad
Chris PeBenito ab58ad
# for gross mistakes in policy
Chris PeBenito ab58ad
neverallow domain domain:dir ~r_dir_perms;
Chris PeBenito ab58ad
neverallow domain domain:file_class_set ~rw_file_perms;
Chris PeBenito ab58ad
neverallow domain file_type:process *;
Chris PeBenito ab58ad
neverallow ~{ domain unlabeled_t } *:process *;