|
Chris PeBenito |
c43097 |
## <module name="bootloader" layer="kernel">
|
|
Chris PeBenito |
c43097 |
## <summary>Policy for the kernel modules, kernel image, and bootloader.</summary>
|
|
Chris PeBenito |
c43097 |
|
|
Chris PeBenito |
c43097 |
########################################
|
|
Chris PeBenito |
0c5a28 |
## <interface name="bootloader_domtrans">
|
|
Chris PeBenito |
c43097 |
## <description>
|
|
Chris PeBenito |
c43097 |
## Execute bootloader in the bootloader domain.
|
|
Chris PeBenito |
c43097 |
## </description>
|
|
Chris PeBenito |
c43097 |
## <parameter name="domain">
|
|
Chris PeBenito |
c43097 |
## The type of the process performing this action.
|
|
Chris PeBenito |
c43097 |
## </parameter>
|
|
Chris PeBenito |
c43097 |
## </interface>
|
|
Chris PeBenito |
c43097 |
#
|
|
Chris PeBenito |
0c5a28 |
define(`bootloader_domtrans',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
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 |
0c5a28 |
define(`bootloader_domtrans_depend',`
|
|
Chris PeBenito |
d11566 |
type bootloader_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
d11566 |
class file { getattr read execute };
|
|
Chris PeBenito |
d11566 |
class process { transition noatsecure siginh rlimitinh sigchld };
|
|
Chris PeBenito |
d11566 |
class fd use;
|
|
Chris PeBenito |
d11566 |
class fifo_file rw_file_perms;
|
|
Chris PeBenito |
c43097 |
')
|
|
Chris PeBenito |
c43097 |
|
|
Chris PeBenito |
c43097 |
########################################
|
|
Chris PeBenito |
0c5a28 |
## <interface name="bootloader_run">
|
|
Chris PeBenito |
c43097 |
## <description>
|
|
Chris PeBenito |
eca5b2 |
## Execute bootloader interactively and do
|
|
Chris PeBenito |
eca5b2 |
## a domain transition to the bootloader domain.
|
|
Chris PeBenito |
c43097 |
## </description>
|
|
Chris PeBenito |
c43097 |
## <parameter name="domain">
|
|
Chris PeBenito |
c43097 |
## The type of the process performing this action.
|
|
Chris PeBenito |
c43097 |
## </parameter>
|
|
Chris PeBenito |
c43097 |
## <parameter name="role">
|
|
Chris PeBenito |
c43097 |
## The role to be allowed the bootloader domain.
|
|
Chris PeBenito |
c43097 |
## </parameter>
|
|
Chris PeBenito |
c43097 |
## <parameter name="terminal">
|
|
Chris PeBenito |
c43097 |
## The type of the terminal allow the bootloader domain to use.
|
|
Chris PeBenito |
c43097 |
## </parameter>
|
|
Chris PeBenito |
c43097 |
## </interface>
|
|
Chris PeBenito |
c43097 |
#
|
|
Chris PeBenito |
0c5a28 |
define(`bootloader_run',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
d11566 |
bootloader_transition($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 |
0c5a28 |
define(`bootloader_run_depend',`
|
|
Chris PeBenito |
d11566 |
type bootloader_t;
|
|
Chris PeBenito |
c2c00b |
class chr_file rw_file_perms;
|
|
Chris PeBenito |
c43097 |
')
|
|
Chris PeBenito |
e181fe |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
eca5b2 |
## <interface name="bootloader_search_boot_dir">
|
|
Chris PeBenito |
eca5b2 |
## <description>
|
|
Chris PeBenito |
eca5b2 |
## Search the /boot directory.
|
|
Chris PeBenito |
eca5b2 |
## </description>
|
|
Chris PeBenito |
eca5b2 |
## <parameter name="domain">
|
|
Chris PeBenito |
eca5b2 |
## The type of the process performing this action.
|
|
Chris PeBenito |
eca5b2 |
## </parameter>
|
|
Chris PeBenito |
eca5b2 |
## </interface>
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_search_boot_dir',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
d11566 |
allow $1 boot_t:dir search;
|
|
Chris PeBenito |
075c4f |
')
|
|
Chris PeBenito |
075c4f |
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_search_boot_dir_depend',`
|
|
Chris PeBenito |
d11566 |
type boot_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
d11566 |
class dir search;
|
|
Chris PeBenito |
075c4f |
')
|
|
Chris PeBenito |
075c4f |
|
|
Chris PeBenito |
075c4f |
########################################
|
|
Chris PeBenito |
eca5b2 |
## <interface name="bootloader_dontaudit_search_boot_dir">
|
|
Chris PeBenito |
eca5b2 |
## <description>
|
|
Chris PeBenito |
eca5b2 |
## Do not audit attempts to search the /boot directory.
|
|
Chris PeBenito |
eca5b2 |
## </description>
|
|
Chris PeBenito |
eca5b2 |
## <parameter name="domain">
|
|
Chris PeBenito |
eca5b2 |
## The type of the process performing this action.
|
|
Chris PeBenito |
eca5b2 |
## </parameter>
|
|
Chris PeBenito |
eca5b2 |
## </interface>
|
|
Chris PeBenito |
075c4f |
#
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_dontaudit_search_boot_dir',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
d11566 |
dontaudit $1 boot_t:dir search;
|
|
Chris PeBenito |
075c4f |
')
|
|
Chris PeBenito |
075c4f |
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_dontaudit_search_boot_dir_depend',`
|
|
Chris PeBenito |
d11566 |
type boot_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
d11566 |
class dir search;
|
|
Chris PeBenito |
075c4f |
')
|
|
Chris PeBenito |
075c4f |
|
|
Chris PeBenito |
075c4f |
########################################
|
|
Chris PeBenito |
eca5b2 |
## <interface name="bootloader_rw_boot_symlinks">
|
|
Chris PeBenito |
eca5b2 |
## <description>
|
|
Chris PeBenito |
eca5b2 |
## Read and write symbolic links
|
|
Chris PeBenito |
eca5b2 |
## in the /boot directory.
|
|
Chris PeBenito |
eca5b2 |
## </description>
|
|
Chris PeBenito |
eca5b2 |
## <parameter name="domain">
|
|
Chris PeBenito |
eca5b2 |
## The type of the process performing this action.
|
|
Chris PeBenito |
eca5b2 |
## </parameter>
|
|
Chris PeBenito |
eca5b2 |
## </interface>
|
|
Chris PeBenito |
075c4f |
#
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_rw_boot_symlinks',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
allow $1 boot_t:dir r_dir_perms;
|
|
Chris PeBenito |
c2c00b |
allow $1 boot_t:lnk_file rw_file_perms;
|
|
Chris PeBenito |
dc771f |
')
|
|
Chris PeBenito |
dc771f |
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_rw_boot_symlinks_depend',`
|
|
Chris PeBenito |
d11566 |
type boot_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
class dir r_dir_perms;
|
|
Chris PeBenito |
c2c00b |
class lnk_file rw_file_perms;
|
|
Chris PeBenito |
dc771f |
')
|
|
Chris PeBenito |
dc771f |
|
|
Chris PeBenito |
dc771f |
########################################
|
|
Chris PeBenito |
eca5b2 |
## <interface name="bootloader_create_kernel">
|
|
Chris PeBenito |
eca5b2 |
## <description>
|
|
Chris PeBenito |
eca5b2 |
## Install a kernel into the /boot directory.
|
|
Chris PeBenito |
eca5b2 |
## </description>
|
|
Chris PeBenito |
eca5b2 |
## <parameter name="domain">
|
|
Chris PeBenito |
eca5b2 |
## The type of the process performing this action.
|
|
Chris PeBenito |
eca5b2 |
## </parameter>
|
|
Chris PeBenito |
eca5b2 |
## </interface>
|
|
Chris PeBenito |
dc771f |
#
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_create_kernel',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
allow $1 boot_t:dir ra_dir_perms;
|
|
Chris PeBenito |
d11566 |
allow $1 boot_t:file { getattr read write create };
|
|
Chris PeBenito |
d11566 |
allow $1 boot_t:lnk_file { getattr read create unlink };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_create_kernel_depend',`
|
|
Chris PeBenito |
d11566 |
type boot_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
class dir ra_dir_perms;
|
|
Chris PeBenito |
d11566 |
class file { getattr read write create };
|
|
Chris PeBenito |
d11566 |
class lnk_file { getattr read create unlink };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
eca5b2 |
## <interface name="bootloader_create_kernel_symbol_table">
|
|
Chris PeBenito |
eca5b2 |
## <description>
|
|
Chris PeBenito |
eca5b2 |
## Install a system.map into the /boot directory.
|
|
Chris PeBenito |
eca5b2 |
## </description>
|
|
Chris PeBenito |
eca5b2 |
## <parameter name="domain">
|
|
Chris PeBenito |
eca5b2 |
## The type of the process performing this action.
|
|
Chris PeBenito |
eca5b2 |
## </parameter>
|
|
Chris PeBenito |
eca5b2 |
## </interface>
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_create_kernel_symbol_table',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
allow $1 boot_t:dir ra_dir_perms;
|
|
Chris PeBenito |
c2c00b |
allow $1 system_map_t:file { rw_file_perms create };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_create_kernel_symbol_table_depend',`
|
|
Chris PeBenito |
d11566 |
type boot_t, system_map_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
class dir ra_dir_perms;
|
|
Chris PeBenito |
c2c00b |
class file { rw_file_perms create };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
eca5b2 |
## <interface name="bootloader_read_kernel_symbol_table">
|
|
Chris PeBenito |
eca5b2 |
## <description>
|
|
Chris PeBenito |
eca5b2 |
## Read system.map in the /boot directory.
|
|
Chris PeBenito |
eca5b2 |
## </description>
|
|
Chris PeBenito |
eca5b2 |
## <parameter name="domain">
|
|
Chris PeBenito |
eca5b2 |
## The type of the process performing this action.
|
|
Chris PeBenito |
eca5b2 |
## </parameter>
|
|
Chris PeBenito |
eca5b2 |
## </interface>
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
b4cd15 |
define(`bootloader_read_kernel_symbol_table',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
allow $1 boot_t:dir r_dir_perms;
|
|
Chris PeBenito |
c2c00b |
allow $1 system_map_t:file f_file_perms;
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
define(`bootloader_read_kernel_symbol_table_depend',`
|
|
Chris PeBenito |
d11566 |
type boot_t, system_map_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
class dir r_dir_perms;
|
|
Chris PeBenito |
c2c00b |
class file r_file_perms;
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
eca5b2 |
## <interface name="bootloader_delete_kernel">
|
|
Chris PeBenito |
eca5b2 |
## <description>
|
|
Chris PeBenito |
eca5b2 |
## Delete a kernel from /boot.
|
|
Chris PeBenito |
eca5b2 |
## </description>
|
|
Chris PeBenito |
eca5b2 |
## <parameter name="domain">
|
|
Chris PeBenito |
eca5b2 |
## The type of the process performing this action.
|
|
Chris PeBenito |
eca5b2 |
## </parameter>
|
|
Chris PeBenito |
eca5b2 |
## </interface>
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_delete_kernel',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
allow $1 boot_t:dir { r_dir_perms write remove_name };
|
|
Chris PeBenito |
d11566 |
allow $1 boot_t:file { getattr unlink };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_delete_kernel_depend',`
|
|
Chris PeBenito |
d11566 |
type boot_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
class dir { r_dir_perms write remove_name };
|
|
Chris PeBenito |
d11566 |
class file { getattr unlink };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
eca5b2 |
## <interface name="bootloader_delete_kernel_symbol_table">
|
|
Chris PeBenito |
eca5b2 |
## <description>
|
|
Chris PeBenito |
eca5b2 |
## Delete a system.map in the /boot directory.
|
|
Chris PeBenito |
eca5b2 |
## </description>
|
|
Chris PeBenito |
eca5b2 |
## <parameter name="domain">
|
|
Chris PeBenito |
eca5b2 |
## The type of the process performing this action.
|
|
Chris PeBenito |
eca5b2 |
## </parameter>
|
|
Chris PeBenito |
eca5b2 |
## </interface>
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_delete_kernel_symbol_table',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
allow $1 boot_t:dir { r_dir_perms write remove_name };
|
|
Chris PeBenito |
d11566 |
allow $1 system_map_t:file { getattr unlink };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_delete_kernel_symbol_table_depend',`
|
|
Chris PeBenito |
d11566 |
type boot_t, system_map_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
class dir { r_dir_perms write remove_name };
|
|
Chris PeBenito |
d11566 |
class file { getattr unlink };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
eca5b2 |
## <interface name="bootloader_read_config">
|
|
Chris PeBenito |
eca5b2 |
## <description>
|
|
Chris PeBenito |
eca5b2 |
## Read the bootloader configuration file.
|
|
Chris PeBenito |
eca5b2 |
## </description>
|
|
Chris PeBenito |
eca5b2 |
## <parameter name="domain">
|
|
Chris PeBenito |
eca5b2 |
## The type of the process performing this action.
|
|
Chris PeBenito |
eca5b2 |
## </parameter>
|
|
Chris PeBenito |
eca5b2 |
## </interface>
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
b4cd15 |
define(`bootloader_read_config',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
allow $1 bootloader_etc_t:file r_file_perms;
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
define(`bootloader_read_config_depend',`
|
|
Chris PeBenito |
d11566 |
type bootloader_etc_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
class file r_file_perms;
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
eca5b2 |
## <interface name="bootloader_rw_config">
|
|
Chris PeBenito |
eca5b2 |
## <description>
|
|
Chris PeBenito |
eca5b2 |
## Read and write the bootloader
|
|
Chris PeBenito |
eca5b2 |
## configuration file.
|
|
Chris PeBenito |
eca5b2 |
## </description>
|
|
Chris PeBenito |
eca5b2 |
## <parameter name="domain">
|
|
Chris PeBenito |
eca5b2 |
## The type of the process performing this action.
|
|
Chris PeBenito |
eca5b2 |
## </parameter>
|
|
Chris PeBenito |
eca5b2 |
## </interface>
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_rw_config',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
allow $1 bootloader_etc_t:file rw_file_perms;
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_rw_config_depend',`
|
|
Chris PeBenito |
d11566 |
type bootloader_etc_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
class file rw_file_perms;
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
b4cd15 |
########################################
|
|
Chris PeBenito |
eca5b2 |
## <interface name="bootloader_rw_tmp_file">
|
|
Chris PeBenito |
eca5b2 |
## <description>
|
|
Chris PeBenito |
eca5b2 |
## Read and write the bootloader
|
|
Chris PeBenito |
eca5b2 |
## temporary data in /tmp.
|
|
Chris PeBenito |
eca5b2 |
## </description>
|
|
Chris PeBenito |
eca5b2 |
## <parameter name="domain">
|
|
Chris PeBenito |
eca5b2 |
## The type of the process performing this action.
|
|
Chris PeBenito |
eca5b2 |
## </parameter>
|
|
Chris PeBenito |
eca5b2 |
## </interface>
|
|
Chris PeBenito |
b4cd15 |
#
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_rw_tmp_file',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
d11566 |
# FIXME: read tmp_t
|
|
Chris PeBenito |
c2c00b |
allow $1 bootloader_tmp_t:file rw_file_perms;
|
|
Chris PeBenito |
7bba9d |
')
|
|
Chris PeBenito |
7bba9d |
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_rw_tmp_file_depend',`
|
|
Chris PeBenito |
d11566 |
type bootloader_tmp_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
class file rw_file_perms;
|
|
Chris PeBenito |
7bba9d |
')
|
|
Chris PeBenito |
7bba9d |
|
|
Chris PeBenito |
7bba9d |
########################################
|
|
Chris PeBenito |
eca5b2 |
## <interface name="bootloader_create_runtime_file">
|
|
Chris PeBenito |
eca5b2 |
## <description>
|
|
Chris PeBenito |
eca5b2 |
## Read and write the bootloader
|
|
Chris PeBenito |
eca5b2 |
## temporary data in /tmp.
|
|
Chris PeBenito |
eca5b2 |
## </description>
|
|
Chris PeBenito |
eca5b2 |
## <parameter name="domain">
|
|
Chris PeBenito |
eca5b2 |
## The type of the process performing this action.
|
|
Chris PeBenito |
eca5b2 |
## </parameter>
|
|
Chris PeBenito |
eca5b2 |
## </interface>
|
|
Chris PeBenito |
7bba9d |
#
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_create_runtime_file',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
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 |
')
|
|
Chris PeBenito |
b4cd15 |
|
|
Chris PeBenito |
eca5b2 |
define(`bootloader_create_runtime_file_depend',`
|
|
Chris PeBenito |
d11566 |
type boot_t, boot_runtime_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
class dir rw_dir_perms;
|
|
Chris PeBenito |
c2c00b |
class file { rw_file_perms create unlink };
|
|
Chris PeBenito |
b4cd15 |
')
|
|
Chris PeBenito |
5f75f5 |
|
|
Chris PeBenito |
5f75f5 |
########################################
|
|
Chris PeBenito |
eca5b2 |
## <interface name="bootloader_list_kernel_modules">
|
|
Chris PeBenito |
eca5b2 |
## <description>
|
|
Chris PeBenito |
eca5b2 |
## List the contents of the kernel module directories.
|
|
Chris PeBenito |
eca5b2 |
## </description>
|
|
Chris PeBenito |
eca5b2 |
## <parameter name="domain">
|
|
Chris PeBenito |
eca5b2 |
## The type of the process performing this action.
|
|
Chris PeBenito |
eca5b2 |
## </parameter>
|
|
Chris PeBenito |
eca5b2 |
## </interface>
|
|
Chris PeBenito |
5f75f5 |
#
|
|
Chris PeBenito |
5f75f5 |
define(`bootloader_list_kernel_modules',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
allow $1 modules_object_t:dir r_dir_perms;
|
|
Chris PeBenito |
5f75f5 |
')
|
|
Chris PeBenito |
5f75f5 |
|
|
Chris PeBenito |
5f75f5 |
define(`bootloader_list_kernel_modules_depend',`
|
|
Chris PeBenito |
d11566 |
type modules_object_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
class dir r_dir_perms;
|
|
Chris PeBenito |
5f75f5 |
')
|
|
Chris PeBenito |
5f75f5 |
|
|
Chris PeBenito |
5f75f5 |
########################################
|
|
Chris PeBenito |
eca5b2 |
## <interface name="bootloader_read_kernel_modules">
|
|
Chris PeBenito |
eca5b2 |
## <description>
|
|
Chris PeBenito |
eca5b2 |
## Read kernel module files.
|
|
Chris PeBenito |
eca5b2 |
## </description>
|
|
Chris PeBenito |
eca5b2 |
## <parameter name="domain">
|
|
Chris PeBenito |
eca5b2 |
## The type of the process performing this action.
|
|
Chris PeBenito |
eca5b2 |
## </parameter>
|
|
Chris PeBenito |
eca5b2 |
## </interface>
|
|
Chris PeBenito |
5f75f5 |
#
|
|
Chris PeBenito |
5f75f5 |
define(`bootloader_read_kernel_modules',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
allow $1 modules_object_t:dir r_dir_perms;
|
|
Chris PeBenito |
c2c00b |
allow $1 modules_object_t:lnk_file r_file_perms;
|
|
Chris PeBenito |
c2c00b |
allow $1 modules_object_t:file r_file_perms;
|
|
Chris PeBenito |
5f75f5 |
')
|
|
Chris PeBenito |
5f75f5 |
|
|
Chris PeBenito |
5f75f5 |
define(`bootloader_read_kernel_modules_depend',`
|
|
Chris PeBenito |
d11566 |
type modules_object_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
class dir r_dir_perms;
|
|
Chris PeBenito |
c2c00b |
class lnk_file r_file_perms;
|
|
Chris PeBenito |
c2c00b |
class file r_file_perms;
|
|
Chris PeBenito |
d490eb |
')
|
|
Chris PeBenito |
d490eb |
|
|
Chris PeBenito |
d490eb |
########################################
|
|
Chris PeBenito |
eca5b2 |
## <interface name="bootloader_write_kernel_modules">
|
|
Chris PeBenito |
eca5b2 |
## <description>
|
|
Chris PeBenito |
eca5b2 |
## Write kernel module files.
|
|
Chris PeBenito |
eca5b2 |
## </description>
|
|
Chris PeBenito |
eca5b2 |
## <parameter name="domain">
|
|
Chris PeBenito |
eca5b2 |
## The type of the process performing this action.
|
|
Chris PeBenito |
eca5b2 |
## </parameter>
|
|
Chris PeBenito |
eca5b2 |
## </interface>
|
|
Chris PeBenito |
d490eb |
#
|
|
Chris PeBenito |
d490eb |
define(`bootloader_write_kernel_modules',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
allow $1 modules_object_t:dir r_dir_perms;
|
|
Chris PeBenito |
eca5b2 |
allow $1 modules_object_t:file { write append };
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
d11566 |
typeattribute $1 can_modify_kernel_modules;
|
|
Chris PeBenito |
d490eb |
')
|
|
Chris PeBenito |
d490eb |
|
|
Chris PeBenito |
d490eb |
define(`bootloader_write_kernel_modules_depend',`
|
|
Chris PeBenito |
d11566 |
attribute can_modify_kernel_modules;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
d11566 |
type modules_object_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
class dir r_dir_perms;
|
|
Chris PeBenito |
eca5b2 |
class file { write append };
|
|
Chris PeBenito |
5f75f5 |
')
|
|
Chris PeBenito |
5f75f5 |
|
|
Chris PeBenito |
5f75f5 |
########################################
|
|
Chris PeBenito |
eca5b2 |
## <interface name="bootloader_manage_kernel_modules">
|
|
Chris PeBenito |
eca5b2 |
## <description>
|
|
Chris PeBenito |
eca5b2 |
## Create, read, write, and delete
|
|
Chris PeBenito |
eca5b2 |
## kernel module files.
|
|
Chris PeBenito |
eca5b2 |
## </description>
|
|
Chris PeBenito |
eca5b2 |
## <parameter name="domain">
|
|
Chris PeBenito |
eca5b2 |
## The type of the process performing this action.
|
|
Chris PeBenito |
eca5b2 |
## </parameter>
|
|
Chris PeBenito |
eca5b2 |
## </interface>
|
|
Chris PeBenito |
5f75f5 |
#
|
|
Chris PeBenito |
d490eb |
define(`bootloader_manage_kernel_modules',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
c2c00b |
allow $1 modules_object_t:file { rw_file_perms create setattr unlink };
|
|
Chris PeBenito |
c2c00b |
allow $1 modules_object_t:dir rw_dir_perms;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
d11566 |
typeattribute $1 can_modify_kernel_modules;
|
|
Chris PeBenito |
5f75f5 |
')
|
|
Chris PeBenito |
5f75f5 |
|
|
Chris PeBenito |
d490eb |
define(`bootloader_manage_kernel_modules_depend',`
|
|
Chris PeBenito |
d11566 |
attribute can_modify_kernel_modules;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
d11566 |
type modules_object_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
d11566 |
class file { getattr create read write setattr unlink };
|
|
Chris PeBenito |
c2c00b |
class dir rw_dir_perms;
|
|
Chris PeBenito |
5f75f5 |
')
|
|
Chris PeBenito |
5f75f5 |
|
|
Chris PeBenito |
5f75f5 |
########################################
|
|
Chris PeBenito |
5f75f5 |
#
|
|
Chris PeBenito |
bd202f |
# bootloader_create_private_module_dir_entry(domain,privatetype,[class(es)])
|
|
Chris PeBenito |
5f75f5 |
#
|
|
Chris PeBenito |
5f75f5 |
define(`bootloader_create_private_module_dir_entry',`
|
|
Chris PeBenito |
d11566 |
requires_block_template(`$0'_depend)
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
d11566 |
allow $1 modules_object_t:dir { getattr search read write add_name remove_name };
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
d11566 |
# if a class is specified use it, else use file as default
|
|
Chris PeBenito |
d11566 |
ifelse(`$3',`',`
|
|
Chris PeBenito |
d11566 |
type_transition $1 modules_object_t:file $2;
|
|
Chris PeBenito |
d11566 |
',`
|
|
Chris PeBenito |
d11566 |
type_transition $1 modules_object_t:$3 $2;
|
|
Chris PeBenito |
d11566 |
')
|
|
Chris PeBenito |
5f75f5 |
')
|
|
Chris PeBenito |
5f75f5 |
|
|
Chris PeBenito |
5f75f5 |
define(`bootloader_create_private_module_dir_entry_depend',`
|
|
Chris PeBenito |
d11566 |
type modules_object_t;
|
|
Chris PeBenito |
d11566 |
|
|
Chris PeBenito |
d11566 |
class dir { getattr search read write add_name remove_name };
|
|
Chris PeBenito |
5f75f5 |
')
|
|
Chris PeBenito |
c43097 |
|
|
Chris PeBenito |
c43097 |
## </module>
|