Blob Blame History Raw

########################################
#
# Helper macros
#

#
# shiftn(num,list...)
#
# shift the list num times
#
define(`shiftn',`ifelse($1,0,`shift($*)',`shiftn(decr($1),shift(shift($*)))')')

########################################
#
# gen_con(context,sensitivity)
#
# Optionally put the sensitivity for the file
#
define(`context_template',`ifdef(`enable_mls',`$1:$2',`$1')') dnl

########################################
#
# can_exec(domain,executable)
#
define(`can_exec',`
	gen_require(`
		class file { rx_file_perms execute_no_trans };
	')

	allow $1 $2:file { rx_file_perms execute_no_trans };
')

########################################
#
# gen_bool(name,default_value)
#
define(`gen_bool',`
	bool $1 dflt_or_overr(`$1'_conf,$2);
')