2005-05-23 15:47:13 +00:00
|
|
|
## <summary>Policy for the kernel modules, kernel image, and bootloader.</summary>
|
|
|
|
|
|
|
|
########################################
|
2005-07-14 18:15:47 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute bootloader in the bootloader domain.
|
2005-07-14 18:15:47 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-23 15:47:13 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`bootloader_domtrans',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
2005-10-18 18:25:33 +00:00
|
|
|
type bootloader_t, bootloader_exec_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-02 18:55:47 +00:00
|
|
|
|
2005-06-08 20:28:45 +00:00
|
|
|
domain_auto_trans($1, bootloader_exec_t, bootloader_t)
|
2005-06-02 18:55:47 +00:00
|
|
|
|
|
|
|
allow $1 bootloader_t:fd use;
|
|
|
|
allow bootloader_t $1:fd use;
|
|
|
|
allow bootloader_t $1:fifo_file rw_file_perms;
|
|
|
|
allow bootloader_t $1:process sigchld;
|
2005-05-23 15:47:13 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-14 18:15:47 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Execute bootloader interactively and do
|
|
|
|
## a domain transition to the bootloader domain.
|
2005-07-14 18:15:47 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The role to be allowed the bootloader domain.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="terminal">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the terminal allow the bootloader domain to use.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-23 15:47:13 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`bootloader_run',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type bootloader_t;
|
|
|
|
')
|
2005-06-02 18:55:47 +00:00
|
|
|
|
2005-06-10 01:01:13 +00:00
|
|
|
bootloader_domtrans($1)
|
2005-06-02 18:55:47 +00:00
|
|
|
|
|
|
|
role $2 types bootloader_t;
|
2005-06-08 20:28:45 +00:00
|
|
|
allow bootloader_t $3:chr_file rw_file_perms;
|
2005-05-23 15:47:13 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-07-14 18:15:47 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read the bootloader configuration file.
|
2005-07-14 18:15:47 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`bootloader_read_config',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type bootloader_etc_t;
|
|
|
|
')
|
2005-06-02 18:55:47 +00:00
|
|
|
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 bootloader_etc_t:file r_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-07-14 18:15:47 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read and write the bootloader
|
|
|
|
## configuration file.
|
2005-07-14 18:15:47 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`bootloader_rw_config',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type bootloader_etc_t;
|
|
|
|
')
|
2005-06-02 18:55:47 +00:00
|
|
|
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 bootloader_etc_t:file rw_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-13 14:37:13 +00:00
|
|
|
########################################
|
2005-07-14 18:15:47 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read and write the bootloader
|
|
|
|
## temporary data in /tmp.
|
2005-07-14 18:15:47 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`bootloader_rw_tmp_files',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type bootloader_tmp_t;
|
|
|
|
')
|
2005-06-02 18:55:47 +00:00
|
|
|
|
2005-06-22 16:07:14 +00:00
|
|
|
# FIXME: read tmp_t dir
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 bootloader_tmp_t:file rw_file_perms;
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-07-14 18:15:47 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read and write the bootloader
|
|
|
|
## temporary data in /tmp.
|
2005-07-14 18:15:47 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## The type of the process performing this action.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`bootloader_create_runtime_file',`
|
2005-06-22 16:07:14 +00:00
|
|
|
gen_require(`
|
|
|
|
type boot_t, boot_runtime_t;
|
|
|
|
')
|
2005-06-02 18:55:47 +00:00
|
|
|
|
2005-06-08 20:28:45 +00:00
|
|
|
allow $1 boot_t:dir rw_dir_perms;
|
|
|
|
allow $1 boot_runtime_t:file { rw_file_perms create unlink };
|
2005-06-02 18:55:47 +00:00
|
|
|
type_transition $1 boot_t:file boot_runtime_t;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|