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
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
domtrans_pattern($1, bootloader_exec_t, bootloader_t)
|
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>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
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;
|
2008-08-14 14:19:50 +00:00
|
|
|
|
|
|
|
ifdef(`distro_redhat',`
|
|
|
|
# for mke2fs
|
2008-11-05 16:10:46 +00:00
|
|
|
mount_run(bootloader_t, $2)
|
2008-08-14 14:19:50 +00:00
|
|
|
')
|
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
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 bootloader_etc_t:file read_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>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
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(`
|
2006-12-12 20:08:08 +00:00
|
|
|
type boot_runtime_t;
|
2005-06-22 16:07:14 +00:00
|
|
|
')
|
2005-06-02 18:55:47 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 boot_runtime_t:file { create_file_perms rw_file_perms };
|
2008-07-23 21:38:39 +00:00
|
|
|
files_boot_filetrans($1, boot_runtime_t, file)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|