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
#
Chris PeBenito de9649
# context_template(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 de9649
Chris PeBenito de9649
########################################
Chris PeBenito de9649
#
Chris PeBenito de9649
# user_mls(level,range)
Chris PeBenito de9649
#
Chris PeBenito de9649
define(`user_mls',`ifdef(`enable_mls',`level $1 range $2')') dnl
Chris PeBenito de9649
Chris PeBenito a71972
define(`can_exec',`allow $1 $2:file { getattr read execute execute_no_trans };')