2005-04-20 19:07:16 +00:00
|
|
|
# Copyright (C) 2005 Tresys Technology, LLC
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# modutils_read_kernel_module_dependencies(domain,[`optional'])
|
|
|
|
#
|
|
|
|
define(`modutils_read_kernel_module_dependencies',`
|
|
|
|
requires_block_template(modutils_read_kernel_module_dependencies_depend,$2)
|
2005-04-25 21:32:09 +00:00
|
|
|
bootloader_list_kernel_modules($1,optional)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 modules_dep_t:file { getattr read };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_read_kernel_module_dependencies_depend',`
|
2005-04-25 21:32:09 +00:00
|
|
|
type modules_dep_t;
|
2005-04-14 20:18:17 +00:00
|
|
|
class file { getattr create read write setattr unlink };
|
|
|
|
class dir { search read write add_name remove_name };
|
2005-04-25 21:32:09 +00:00
|
|
|
bootloader_list_kernel_modules_depend
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# modutils_read_kernel_module_loading_config(domain,[`optional'])
|
|
|
|
#
|
|
|
|
define(`modutils_read_kernel_module_loading_config',`
|
|
|
|
requires_block_template(modutils_read_kernel_module_loading_config_depend,$2)
|
|
|
|
allow $1 modules_conf_t:file { getattr read };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_read_kernel_module_loading_config_depend',`
|
|
|
|
type modules_conf_t;
|
|
|
|
class file { getattr create read write setattr unlink };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# modutils_insmod_transition(domain,[`optional'])
|
|
|
|
#
|
|
|
|
define(`modutils_insmod_transition',`
|
|
|
|
requires_block_template(modutils_insmod_transition_depend,$2)
|
|
|
|
allow $1 insmod_exec_t:file { getattr read execute };
|
|
|
|
allow $1 insmod_t:process transition;
|
|
|
|
type_transition $1 insmod_exec_t:file insmod_t;
|
|
|
|
dontaudit $1 insmod_t:process { noatsecure siginh rlimitinh };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_insmod_transition_depend',`
|
|
|
|
type insmod_t;
|
|
|
|
class file { getattr read execute };
|
|
|
|
class process { transition noatsecure siginh rlimitinh };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# modutils_insmod_execute(domain,[`optional'])
|
|
|
|
#
|
|
|
|
define(`modutils_insmod_execute',`
|
|
|
|
requires_block_template(modutils_insmod_execute_depend,$2)
|
|
|
|
allow $1 insmod_exec_t:file { getattr read execute execute_no_trans };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_insmod_execute_depend',`
|
|
|
|
type insmod_t;
|
|
|
|
class file { getattr read execute execute_no_trans };
|
|
|
|
')
|
2005-04-21 21:34:47 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# modutils_depmod_transition(domain,[`optional'])
|
|
|
|
#
|
|
|
|
define(`modutils_depmod_transition',`
|
|
|
|
requires_block_template(modutils_depmod_transition_depend,$2)
|
|
|
|
allow $1 depmod_exec_t:file { getattr read execute };
|
|
|
|
allow $1 depmod_t:process transition;
|
|
|
|
type_transition $1 depmod_exec_t:file depmod_t;
|
|
|
|
dontaudit $1 depmod_t:process { noatsecure siginh rlimitinh };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_depmod_transition_depend',`
|
|
|
|
type depmod_t;
|
|
|
|
class file { getattr read execute };
|
|
|
|
class process { transition noatsecure siginh rlimitinh };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# modutils_depmod_execute(domain,[`optional'])
|
|
|
|
#
|
|
|
|
define(`modutils_depmod_execute',`
|
|
|
|
requires_block_template(modutils_depmod_execute_depend,$2)
|
|
|
|
allow $1 depmod_exec_t:file { getattr read execute execute_no_trans };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_depmod_execute_depend',`
|
|
|
|
type depmod_t;
|
|
|
|
class file { getattr read execute execute_no_trans };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# modutils_update_modules_transition(domain,[`optional'])
|
|
|
|
#
|
|
|
|
define(`modutils_update_modules_transition',`
|
|
|
|
requires_block_template(modutils_update_modules_transition_depend,$2)
|
|
|
|
allow $1 update_modules_exec_t:file { getattr read execute };
|
|
|
|
allow $1 update_modules_t:process transition;
|
|
|
|
type_transition $1 update_modules_exec_t:file update_modules_t;
|
|
|
|
dontaudit $1 update_modules_t:process { noatsecure siginh rlimitinh };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_update_modules_transition_depend',`
|
|
|
|
type update_modules_t;
|
|
|
|
class file { getattr read execute };
|
|
|
|
class process { transition noatsecure siginh rlimitinh };
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# modutils_update_modules_execute(domain,[`optional'])
|
|
|
|
#
|
|
|
|
define(`modutils_update_modules_execute',`
|
|
|
|
requires_block_template(modutils_update_modules_execute_depend,$2)
|
|
|
|
allow $1 update_modules_exec_t:file { getattr read execute execute_no_trans };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`modutils_update_modules_execute_depend',`
|
|
|
|
type update_modules_t;
|
|
|
|
class file { getattr read execute execute_no_trans };
|
|
|
|
')
|