|
Chris PeBenito |
c43097 |
## <summary>Policy for the kernel modules, kernel image, and bootloader.</summary>
|
|
Chris PeBenito |
c43097 |
|
|
Chris PeBenito |
c43097 |
########################################
|
|
Chris PeBenito |
11633b |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Execute bootloader in the bootloader domain.
|
|
Chris PeBenito |
11633b |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
c43097 |
#
|
|
Chris PeBenito |
199895 |
interface(`bootloader_domtrans',`
|
|
Chris PeBenito |
cbc9d6 |
gen_require(`
|
|
Chris PeBenito |
12ae75 |
type bootloader_t, bootloader_exec_t;
|
|
Chris PeBenito |
cbc9d6 |
')
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
domain_auto_trans($1, bootloader_exec_t, bootloader_t)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
d11566 |
allow $1 bootloader_t:fd use;
|
|
Chris PeBenito |
d11566 |
allow bootloader_t $1:fd use;
|
|
Chris PeBenito |
d11566 |
allow bootloader_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
d11566 |
allow bootloader_t $1:process sigchld;
|
|
Chris PeBenito |
c43097 |
')
|
|
Chris PeBenito |
c43097 |
|
|
Chris PeBenito |
c43097 |
########################################
|
|
Chris PeBenito |
11633b |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Execute bootloader interactively and do
|
|
Chris PeBenito |
414e41 |
## a domain transition to the bootloader domain.
|
|
Chris PeBenito |
11633b |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
414e41 |
## <param name="role">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The role to be allowed the bootloader domain.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
414e41 |
## <param name="terminal">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the terminal allow the bootloader domain to use.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
c43097 |
#
|
|
Chris PeBenito |
199895 |
interface(`bootloader_run',`
|
|
Chris PeBenito |
cbc9d6 |
gen_require(`
|
|
Chris PeBenito |
cbc9d6 |
type bootloader_t;
|
|
Chris PeBenito |
cbc9d6 |
')
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
0fd9dc |
bootloader_domtrans($1)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
d11566 |
role $2 types bootloader_t;
|
|
Chris PeBenito |
c2c00b |
allow bootloader_t $3:chr_file rw_file_perms;
|
|
Chris PeBenito |
c43097 |
')
|
|
Chris PeBenito |
c43097 |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
11633b |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Read the bootloader configuration file.
|
|
Chris PeBenito |
11633b |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
199895 |
interface(`bootloader_read_config',`
|
|
Chris PeBenito |
cbc9d6 |
gen_require(`
|
|
Chris PeBenito |
cbc9d6 |
type bootloader_etc_t;
|
|
Chris PeBenito |
cbc9d6 |
')
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
allow $1 bootloader_etc_t:file r_file_perms;
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
11633b |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Read and write the bootloader
|
|
Chris PeBenito |
414e41 |
## configuration file.
|
|
Chris PeBenito |
11633b |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
199895 |
interface(`bootloader_rw_config',`
|
|
Chris PeBenito |
cbc9d6 |
gen_require(`
|
|
Chris PeBenito |
cbc9d6 |
type bootloader_etc_t;
|
|
Chris PeBenito |
cbc9d6 |
')
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
allow $1 bootloader_etc_t:file rw_file_perms;
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
11633b |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Read and write the bootloader
|
|
Chris PeBenito |
414e41 |
## temporary data in /tmp.
|
|
Chris PeBenito |
11633b |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
1815ba |
interface(`bootloader_rw_tmp_files',`
|
|
Chris PeBenito |
cbc9d6 |
gen_require(`
|
|
Chris PeBenito |
cbc9d6 |
type bootloader_tmp_t;
|
|
Chris PeBenito |
cbc9d6 |
')
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
cbc9d6 |
# FIXME: read tmp_t dir
|
|
Chris PeBenito |
c2c00b |
allow $1 bootloader_tmp_t:file rw_file_perms;
|
|
Chris PeBenito |
7bba9d |
')
|
|
Chris PeBenito |
7bba9d |
|
|
Chris PeBenito |
7bba9d |
########################################
|
|
Chris PeBenito |
11633b |
## <summary>
|
|
Chris PeBenito |
414e41 |
## Read and write the bootloader
|
|
Chris PeBenito |
414e41 |
## temporary data in /tmp.
|
|
Chris PeBenito |
11633b |
## </summary>
|
|
Chris PeBenito |
414e41 |
## <param name="domain">
|
|
Chris PeBenito |
885b83 |
## <summary>
|
|
Chris PeBenito |
414e41 |
## The type of the process performing this action.
|
|
Chris PeBenito |
885b83 |
## </summary>
|
|
Chris PeBenito |
414e41 |
## </param>
|
|
Chris PeBenito |
7bba9d |
#
|
|
Chris PeBenito |
199895 |
interface(`bootloader_create_runtime_file',`
|
|
Chris PeBenito |
cbc9d6 |
gen_require(`
|
|
Chris PeBenito |
cbc9d6 |
type boot_t, boot_runtime_t;
|
|
Chris PeBenito |
cbc9d6 |
')
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
allow $1 boot_t:dir rw_dir_perms;
|
|
Chris PeBenito |
c2c00b |
allow $1 boot_runtime_t:file { rw_file_perms create unlink };
|
|
Chris PeBenito |
d11566 |
type_transition $1 boot_t:file boot_runtime_t;
|
|
Chris PeBenito |
b4cd15 |
')
|