2005-05-23 15:50:12 +00:00
|
|
|
## <module name="modutils" layer="system">
|
|
|
|
## <summary>Policy for kernel module utilities</summary>
|
2005-04-20 19:07:16 +00:00
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
2005-05-19 21:06:06 +00:00
|
|
|
## <interface name="modutils_read_kernel_module_dependencies">
|
|
|
|
## <description>
|
|
|
|
## Read the dependencies of kernel modules.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="read" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`modutils_read_kernel_module_dependencies',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
bootloader_list_kernel_modules($1)
|
|
|
|
allow $1 modules_dep_t:file { getattr read };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_read_kernel_module_dependencies_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type modules_dep_t;
|
|
|
|
|
|
|
|
class file { getattr create read write setattr unlink };
|
|
|
|
class dir { search read write add_name remove_name };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-05-19 21:06:06 +00:00
|
|
|
## <interface name="modutils_read_kernel_module_loading_config">
|
|
|
|
## <description>
|
|
|
|
## Read the configuration options used when
|
|
|
|
## loading modules.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="read" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`modutils_read_kernel_module_loading_config',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
allow $1 modules_conf_t:file { getattr read };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_read_kernel_module_loading_config_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type modules_conf_t;
|
|
|
|
|
|
|
|
class file { getattr create read write setattr unlink };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-05-19 21:06:06 +00:00
|
|
|
## <interface name="modutils_insmod_transition">
|
|
|
|
## <description>
|
2005-05-30 21:17:20 +00:00
|
|
|
## Execute insmod in the insmod domain. Has a
|
|
|
|
## sigchld backchannel.
|
2005-05-19 21:06:06 +00:00
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`modutils_insmod_transition',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
allow $1 insmod_exec_t:file { getattr read execute };
|
|
|
|
allow $1 insmod_t:process transition;
|
|
|
|
type_transition $1 insmod_exec_t:process insmod_t;
|
|
|
|
dontaudit $1 insmod_t:process { noatsecure siginh rlimitinh };
|
|
|
|
|
|
|
|
allow $1 insmod_t:fd use;
|
|
|
|
allow insmod_t $1:fd use;
|
|
|
|
allow insmod_t $1:fifo_file rw_file_perms;
|
|
|
|
allow insmod_t $1:process sigchld;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_insmod_transition_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type insmod_t;
|
|
|
|
|
|
|
|
class file { getattr read execute };
|
|
|
|
class process { transition noatsecure siginh rlimitinh sigchld };
|
|
|
|
class fd use;
|
|
|
|
class fifo_file rw_file_perms;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="modutils_insmod_transition_add_role_use_terminal">
|
|
|
|
## <description>
|
|
|
|
## Execute insmod in the insmod domain, and
|
|
|
|
## allow the specified role the insmod domain,
|
2005-05-30 21:17:20 +00:00
|
|
|
## and use the caller's terminal. Has a sigchld
|
|
|
|
## backchannel.
|
2005-05-19 21:06:06 +00:00
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <parameter name="role">
|
|
|
|
## The role to be allowed the insmod domain.
|
|
|
|
## </parameter>
|
|
|
|
## <parameter name="terminal">
|
|
|
|
## The type of the terminal allow the insmod domain to use.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
|
|
|
## </interface>
|
|
|
|
#
|
|
|
|
define(`modutils_insmod_transition_add_role_use_terminal',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
modutils_insmod_transition($1)
|
|
|
|
role $2 types insmod_t;
|
|
|
|
allow insmod_t $3:chr_file { getattr read write ioctl };
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_insmod_transition_add_role_use_terminal_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type insmod_t;
|
|
|
|
|
|
|
|
class chr_file { getattr read write ioctl };
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# modutils_insmod_execute(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`modutils_insmod_execute',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
allow $1 insmod_exec_t:file { getattr read execute execute_no_trans };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_insmod_execute_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type insmod_t;
|
|
|
|
|
|
|
|
class file { getattr read execute execute_no_trans };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
2005-04-21 21:34:47 +00:00
|
|
|
|
|
|
|
########################################
|
2005-05-19 21:06:06 +00:00
|
|
|
## <interface name="modutils_depmod_transition">
|
|
|
|
## <description>
|
|
|
|
## Execute depmod in the depmod domain.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-21 21:34:47 +00:00
|
|
|
#
|
|
|
|
define(`modutils_depmod_transition',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
allow $1 depmod_exec_t:file { getattr read execute };
|
|
|
|
allow $1 depmod_t:process transition;
|
|
|
|
type_transition $1 depmod_exec_t:process depmod_t;
|
|
|
|
dontaudit $1 depmod_t:process { noatsecure siginh rlimitinh };
|
|
|
|
|
|
|
|
allow $1 depmod_t:fd use;
|
|
|
|
allow depmod_t $1:fd use;
|
|
|
|
allow depmod_t $1:fifo_file rw_file_perms;
|
|
|
|
allow depmod_t $1:process sigchld;
|
2005-04-21 21:34:47 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_depmod_transition_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type depmod_t;
|
|
|
|
|
|
|
|
class file { getattr read execute };
|
|
|
|
class process { transition noatsecure siginh rlimitinh sigchld };
|
|
|
|
class fd use;
|
|
|
|
class fifo_file rw_file_perms;
|
2005-04-21 21:34:47 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="modutils_depmod_transition_add_role_use_terminal">
|
|
|
|
## <description>
|
|
|
|
## Execute depmod in the depmod domain.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <parameter name="role">
|
|
|
|
## The role to be allowed the depmod domain.
|
|
|
|
## </parameter>
|
|
|
|
## <parameter name="terminal">
|
|
|
|
## The type of the terminal allow the depmod domain to use.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
|
|
|
## </interface>
|
|
|
|
#
|
|
|
|
define(`modutils_depmod_transition_add_role_use_terminal',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
modutils_depmod_transition($1)
|
|
|
|
role $2 types insmod_t;
|
|
|
|
allow insmod_t $3:chr_file { getattr read write ioctl };
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_depmod_transition_add_role_use_terminal_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type depmod_t;
|
|
|
|
|
|
|
|
class chr_file { getattr read write ioctl };
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-04-21 21:34:47 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# modutils_depmod_execute(domain)
|
2005-04-21 21:34:47 +00:00
|
|
|
#
|
|
|
|
define(`modutils_depmod_execute',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
allow $1 depmod_exec_t:file { getattr read execute execute_no_trans };
|
2005-04-21 21:34:47 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_depmod_execute_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type depmod_t;
|
|
|
|
|
|
|
|
class file { getattr read execute execute_no_trans };
|
2005-04-21 21:34:47 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
2005-05-19 21:06:06 +00:00
|
|
|
## <interface name="modutils_update_modules_transition">
|
|
|
|
## <description>
|
|
|
|
## Execute depmod in the depmod domain.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-21 21:34:47 +00:00
|
|
|
#
|
|
|
|
define(`modutils_update_modules_transition',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
allow $1 update_modules_exec_t:file { getattr read execute };
|
|
|
|
allow $1 update_modules_t:process transition;
|
|
|
|
type_transition $1 update_modules_exec_t:process update_modules_t;
|
|
|
|
dontaudit $1 update_modules_t:process { noatsecure siginh rlimitinh };
|
|
|
|
|
|
|
|
allow $1 update_modules_t:fd use;
|
|
|
|
allow update_modules_t $1:fd use;
|
|
|
|
allow update_modules_t $1:fifo_file rw_file_perms;
|
|
|
|
allow update_modules_t $1:process sigchld;
|
2005-04-21 21:34:47 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_update_modules_transition_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type update_modules_t;
|
|
|
|
|
|
|
|
class file { getattr read execute };
|
|
|
|
class process { transition noatsecure siginh rlimitinh signal };
|
|
|
|
class fd use;
|
|
|
|
class fifo_file rw_file_perms;
|
2005-04-21 21:34:47 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="modutils_update_modules_transition_add_role_use_terminal">
|
|
|
|
## <description>
|
|
|
|
## Execute update_modules in the update_modules domain.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <parameter name="role">
|
|
|
|
## The role to be allowed the update_modules domain.
|
|
|
|
## </parameter>
|
|
|
|
## <parameter name="terminal">
|
|
|
|
## The type of the terminal allow the update_modules domain to use.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
|
|
|
## </interface>
|
|
|
|
#
|
|
|
|
define(`modutils_update_modules_transition_add_role_use_terminal',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
modutils_update_modules_transition($1)
|
|
|
|
role $2 types update_modules_t;
|
|
|
|
allow update_modules_t $3:chr_file { getattr read write ioctl };
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_update_modules_transition_add_role_use_terminal_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type update_modules_t;
|
|
|
|
|
|
|
|
class chr_file { getattr read write ioctl };
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2005-04-21 21:34:47 +00:00
|
|
|
########################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# modutils_update_modules_execute(domain)
|
2005-04-21 21:34:47 +00:00
|
|
|
#
|
|
|
|
define(`modutils_update_modules_execute',`
|
2005-06-03 12:25:14 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
|
|
|
|
allow $1 update_modules_exec_t:file { getattr read execute execute_no_trans };
|
2005-04-21 21:34:47 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_update_modules_execute_depend',`
|
2005-06-03 12:25:14 +00:00
|
|
|
type update_modules_t;
|
|
|
|
|
|
|
|
class file { getattr read execute execute_no_trans };
|
2005-04-21 21:34:47 +00:00
|
|
|
')
|
2005-05-23 15:50:12 +00:00
|
|
|
|
|
|
|
## </module>
|