## Build packages in a chroot environment.
########################################
##
## Execute the mock program in the mock domain.
##
##
##
## Domain allowed access.
##
##
#
interface(`mock_domtrans',`
gen_require(`
type mock_t, mock_exec_t;
')
corecmd_search_bin($1)
domain_auto_trans($1, mock_exec_t, mock_t)
allow $1 mock_t:fd use;
allow mock_t $1:fd use;
allow mock_t $1:fifo_file rw_file_perms;
allow mock_t $1:process sigchld;
')
########################################
##
## Create objects in the /var/lib/mock directory
##
##
##
## Domain allowed access.
##
##
##
##
## The type of the object to be created
##
##
##
##
## The object class.
##
##
#
interface(`files_var_lib_mock_filetrans',`
gen_require(`
type var_t, var_lib_t, mock_var_lib_t;
')
allow $1 var_t:dir search_dir_perms;
allow $1 var_lib_t:dir search_dir_perms;
allow $1 mock_var_lib_t:dir rw_dir_perms;
type_transition $1 mock_var_lib_t:$3 $2;
')