selinux-policy/policy/modules/admin/bootloader.if

130 lines
2.6 KiB
Plaintext
Raw Normal View History

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">
## <summary>
2005-06-23 21:30:57 +00:00
## The type of the process performing this action.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2005-05-23 15:47:13 +00:00
#
interface(`bootloader_domtrans',`
gen_require(`
2005-10-18 18:25:33 +00:00
type bootloader_t, bootloader_exec_t;
')
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">
## <summary>
2005-06-23 21:30:57 +00:00
## The type of the process performing this action.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
## <param name="role">
## <summary>
2005-06-23 21:30:57 +00:00
## The role to be allowed the bootloader domain.
## </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
#
interface(`bootloader_run',`
gen_require(`
type bootloader_t;
')
2005-06-10 01:01:13 +00:00
bootloader_domtrans($1)
role $2 types bootloader_t;
ifdef(`distro_redhat',`
# for mke2fs
2008-11-05 16:10:46 +00:00
mount_run(bootloader_t, $2)
')
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">
## <summary>
2005-06-23 21:30:57 +00:00
## The type of the process performing this action.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2005-04-14 20:18:17 +00:00
#
interface(`bootloader_read_config',`
gen_require(`
type bootloader_etc_t;
')
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">
## <summary>
2005-06-23 21:30:57 +00:00
## The type of the process performing this action.
## </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
#
interface(`bootloader_rw_config',`
gen_require(`
type bootloader_etc_t;
')
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">
## <summary>
2005-06-23 21:30:57 +00:00
## The type of the process performing this action.
## </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',`
gen_require(`
type bootloader_tmp_t;
')
# 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">
## <summary>
2005-06-23 21:30:57 +00:00
## The type of the process performing this action.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
2005-04-14 20:18:17 +00:00
#
interface(`bootloader_create_runtime_file',`
gen_require(`
2006-12-12 20:08:08 +00:00
type boot_runtime_t;
')
2006-12-12 20:08:08 +00:00
allow $1 boot_runtime_t:file { create_file_perms rw_file_perms };
files_boot_filetrans($1, boot_runtime_t, file)
2005-04-14 20:18:17 +00:00
')