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

135 lines
2.9 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;
')
2005-06-08 20:28:45 +00:00
domain_auto_trans($1, bootloader_exec_t, bootloader_t)
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">
## <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>
## <param name="terminal">
## <summary>
2005-06-23 21:30:57 +00:00
## The type of the terminal allow the bootloader domain to use.
## </summary>
2005-06-23 21:30:57 +00:00
## </param>
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;
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">
## <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;
')
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">
## <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_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(`
type boot_t, boot_runtime_t;
')
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 };
type_transition $1 boot_t:file boot_runtime_t;
2005-04-14 20:18:17 +00:00
')