Chris PeBenito de9649
Chris PeBenito de9649
########################################
Chris PeBenito de9649
#
Chris PeBenito de9649
# Helper macros
Chris PeBenito de9649
#
Chris PeBenito de9649
Chris PeBenito de9649
#
Chris PeBenito de9649
# shiftn(num,list...)
Chris PeBenito de9649
#
Chris PeBenito de9649
# shift the list num times
Chris PeBenito de9649
#
Chris PeBenito de9649
define(`shiftn',`ifelse($1,0,`shift($*)',`shiftn(decr($1),shift(shift($*)))')')
Chris PeBenito de9649
Chris PeBenito de9649
########################################
Chris PeBenito de9649
#
Karl MacMillan eb5e23
# gen_con(context,sensitivity)
Chris PeBenito de9649
#
Chris PeBenito de9649
# Optionally put the sensitivity for the file
Chris PeBenito de9649
#
Chris PeBenito de9649
define(`context_template',`ifdef(`enable_mls',`$1:$2',`$1')') dnl
Chris PeBenito e3fd77
Chris PeBenito 8c2f3a
define(`can_exec',`
Chris PeBenito 8c2f3a
	gen_require(`
Chris PeBenito 8c2f3a
		class file { rx_file_perms execute_no_trans };
Chris PeBenito 8c2f3a
	')
Chris PeBenito 8c2f3a
Chris PeBenito 8c2f3a
	allow $1 $2:file { rx_file_perms execute_no_trans };
Chris PeBenito 8c2f3a
')