Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Define m4 macros for the constraints
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Define the constraints
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# constrain class_set perm_set expression ;
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# expression : ( expression ) 
Chris PeBenito ab58ad
#	     | not expression
Chris PeBenito ab58ad
#	     | expression and expression
Chris PeBenito ab58ad
#	     | expression or expression
Chris PeBenito ab58ad
#	     | u1 op u2
Chris PeBenito ab58ad
#	     | r1 role_op r2
Chris PeBenito ab58ad
#	     | t1 op t2
Chris PeBenito ab58ad
#	     | u1 op names
Chris PeBenito ab58ad
#	     | u2 op names
Chris PeBenito ab58ad
#	     | r1 op names
Chris PeBenito ab58ad
#	     | r2 op names
Chris PeBenito ab58ad
#	     | t1 op names
Chris PeBenito ab58ad
#	     | t2 op names
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# op : == | != 
Chris PeBenito ab58ad
# role_op : == | != | eq | dom | domby | incomp
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# names : name | { name_list }
Chris PeBenito ab58ad
# name_list : name | name_list name#		
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Restrict the ability to transition to other users
Chris PeBenito ab58ad
# or roles to a few privileged types.
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
Chris PeBenito ab58ad
constrain process transition
Chris PeBenito ab58ad
	( u1 == u2 or t1 == privuser );
Chris PeBenito ab58ad
Chris PeBenito ab58ad
constrain process transition 
Chris PeBenito ab58ad
	( r1 == r2 or t1 == privrole );
Chris PeBenito ab58ad
Chris PeBenito ab58ad
constrain process dyntransition
Chris PeBenito ab58ad
	( u1 == u2 and r1 == r2);
Chris PeBenito ab58ad
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
# Restrict the ability to label objects with other
Chris PeBenito ab58ad
# user identities to a few privileged types.
Chris PeBenito ab58ad
#
Chris PeBenito ab58ad
Chris PeBenito ab58ad
constrain dir_file_class_set { create relabelto relabelfrom } 
Chris PeBenito ab58ad
	( u1 == u2 or t1 == privowner );
Chris PeBenito ab58ad
Chris PeBenito ab58ad
constrain socket_class_set { create relabelto relabelfrom } 
Chris PeBenito ab58ad
	( u1 == u2 or t1 == privowner );