Chris PeBenito b841df
## <summary>Livecd tool for building alternate livecd for different os and policy versions.</summary>
Chris PeBenito b841df
Chris PeBenito b841df
########################################
Chris PeBenito b841df
## <summary>
Chris PeBenito b841df
##	Execute a domain transition to run livecd.
Chris PeBenito b841df
## </summary>
Chris PeBenito b841df
## <param name="domain">
Chris PeBenito b841df
## <summary>
Chris PeBenito b841df
##	Domain allowed to transition.
Chris PeBenito b841df
## </summary>
Chris PeBenito b841df
## </param>
Chris PeBenito b841df
#
Chris PeBenito b841df
interface(`livecd_domtrans',`
Chris PeBenito b841df
	gen_require(`
Chris PeBenito b841df
		type livecd_t, livecd_exec_t;
Chris PeBenito b841df
	')
Chris PeBenito b841df
Chris PeBenito b841df
	domtrans_pattern($1, livecd_exec_t, livecd_t)
Chris PeBenito b841df
')
Chris PeBenito b841df
Chris PeBenito b841df
########################################
Chris PeBenito b841df
## <summary>
Chris PeBenito b841df
##	Execute livecd in the livecd domain, and
Chris PeBenito b841df
##	allow the specified role the livecd domain.
Chris PeBenito b841df
## </summary>
Chris PeBenito b841df
## <param name="domain">
Chris PeBenito b841df
##	<summary>
Dominick Grift 03b866
##	Domain allowed to transition.
Chris PeBenito b841df
##	</summary>
Chris PeBenito b841df
## </param>
Chris PeBenito b841df
## <param name="role">
Chris PeBenito b841df
##	<summary>
Chris PeBenito b841df
##	Role allowed access.
Chris PeBenito b841df
##	</summary>
Chris PeBenito b841df
## </param>
Chris PeBenito b841df
#
Chris PeBenito b841df
interface(`livecd_run',`
Chris PeBenito b841df
	gen_require(`
Chris PeBenito b841df
		type livecd_t;
Chris PeBenito b841df
	')
Chris PeBenito b841df
Chris PeBenito b841df
	livecd_domtrans($1)
Chris PeBenito b841df
	role $2 types livecd_t;
Chris PeBenito b841df
Chris PeBenito b841df
	optional_policy(`
Chris PeBenito b841df
		mount_run(livecd_t, $2)
Chris PeBenito b841df
	')
Chris PeBenito b841df
')
Chris PeBenito b841df
Chris PeBenito b841df
########################################
Chris PeBenito b841df
## <summary>
Chris PeBenito b841df
##	Read livecd temporary files.
Chris PeBenito b841df
## </summary>
Chris PeBenito b841df
## <param name="domain">
Chris PeBenito b841df
##	<summary>
Chris PeBenito b841df
##	Domain allowed access.
Chris PeBenito b841df
##	</summary>
Chris PeBenito b841df
## </param>
Chris PeBenito b841df
#
Chris PeBenito b841df
interface(`livecd_read_tmp_files',`
Chris PeBenito b841df
	gen_require(`
Chris PeBenito b841df
		type livecd_tmp_t;
Chris PeBenito b841df
	')
Chris PeBenito b841df
Chris PeBenito b841df
	files_search_tmp($1)
Chris PeBenito b841df
	read_files_pattern($1, livecd_tmp_t, livecd_tmp_t)
Chris PeBenito b841df
')
Chris PeBenito b841df
Chris PeBenito b841df
########################################
Chris PeBenito b841df
## <summary>
Chris PeBenito b841df
##	Read and write livecd temporary files.
Chris PeBenito b841df
## </summary>
Chris PeBenito b841df
## <param name="domain">
Chris PeBenito b841df
##	<summary>
Chris PeBenito b841df
##	Domain allowed access.
Chris PeBenito b841df
##	</summary>
Chris PeBenito b841df
## </param>
Chris PeBenito b841df
#
Chris PeBenito b841df
interface(`livecd_rw_tmp_files',`
Chris PeBenito b841df
	gen_require(`
Chris PeBenito b841df
		type livecd_tmp_t;
Chris PeBenito b841df
	')
Chris PeBenito b841df
Chris PeBenito b841df
	files_search_tmp($1)
Chris PeBenito b841df
	allow $1 livecd_tmp_t:file rw_file_perms;
Chris PeBenito b841df
')
Chris PeBenito b841df
Chris PeBenito b841df
########################################
Chris PeBenito b841df
## <summary>
Chris PeBenito b841df
##	Allow read and write access to livecd semaphores.
Chris PeBenito b841df
## </summary>
Chris PeBenito b841df
## <param name="domain">
Chris PeBenito b841df
##	<summary>
Chris PeBenito b841df
##	Domain allowed access.
Chris PeBenito b841df
##	</summary>
Chris PeBenito b841df
## </param>
Chris PeBenito b841df
#
Chris PeBenito b841df
interface(`livecd_rw_semaphores',`
Chris PeBenito b841df
	gen_require(`
Chris PeBenito b841df
		type livecd_t;
Chris PeBenito b841df
	')
Chris PeBenito b841df
Chris PeBenito b841df
	allow $1 livecd_t:sem { unix_read unix_write associate read write };
Chris PeBenito b841df
')