selinux-policy/refpolicy/policy/modules/kernel/kernel.if

1463 lines
34 KiB
Plaintext
Raw Normal View History

2005-06-01 14:17:43 +00:00
## <module name="kernel" layer="kernel">
## <summary>
## Policy for kernel threads, security interface (selinuxfs),
## proc filesystem, sysfs filesystem, and usb device filesystem.
## </summary>
2005-04-20 19:07:16 +00:00
########################################
#
# kernel_make_userland_entrypoint(domain,entrypoint)
#
define(`kernel_make_userland_entrypoint',`
requires_block_template(`$0'_depend)
allow kernel_t $2:file { getattr read execute };
allow kernel_t $1:process transition;
allow $1 kernel_t:fd use;
type_transition kernel_t $2:process $1;
dontaudit kernel_t $1:process { noatsecure siginh rlimitinh };
allow $1 kernel_t:fd use;
allow kernel_t $1:fd use;
allow kernel_t $1:fifo_file rw_file_perms;
allow $1 kernel_t:process sigchld;
')
define(`kernel_make_userland_entrypoint_depend',`
type kernel_t;
class process { transition noatsecure siginh rlimitinh sigchld };
class file { getattr read execute };
class fifo_file rw_file_perms;
class fd use;
')
2005-04-14 20:18:17 +00:00
########################################
#
# kernel_share_state(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_share_state',`
requires_block_template(`$0'_depend)
allow kernel_t $1:process share;
2005-04-14 20:18:17 +00:00
')
define(`kernel_share_state_depend',`
type kernel_t;
class process share;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_use_file_descriptors(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_use_file_descriptors',`
requires_block_template(`$0'_depend)
allow $1 kernel_t:fd use;
2005-04-14 20:18:17 +00:00
')
define(`kernel_use_file_descriptors_depend',`
type kernel_t;
class fd use;
2005-04-28 21:41:09 +00:00
')
########################################
#
# kernel_ignore_use_file_descriptors(domain)
2005-04-28 21:41:09 +00:00
#
define(`kernel_ignore_use_file_descriptors',`
requires_block_template(`$0'_depend)
dontaudit $1 kernel_t:fd use;
2005-04-28 21:41:09 +00:00
')
define(`kernel_ignore_use_file_descriptors_depend',`
type kernel_t;
class fd use;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_make_root_filesystem_mountpoint(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_make_root_filesystem_mountpoint',`
requires_block_template(`$0'_depend)
allow kernel_t $1:dir mounton;
2005-04-14 20:18:17 +00:00
')
define(`kernel_make_root_filesystem_mountpoint_depend',`
type kernel_t;
class dir mounton;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_make_process_identity_change_constraint_exception(domain)
#
define(`kernel_make_process_identity_change_constraint_exception',`
requires_block_template(`$0'_depend)
typeattribute $1 can_change_process_identity;
')
define(`kernel_make_process_identity_change_constraint_exception_depend',`
attribute can_change_process_identity;
')
########################################
#
# kernel_make_role_change_constraint_exception(domain)
#
define(`kernel_make_role_change_constraint_exception',`
requires_block_template(`$0'_depend)
typeattribute $1 can_change_process_role;
')
define(`kernel_make_role_change_constraint_exception_depend',`
attribute can_change_process_role;
')
########################################
#
# kernel_make_object_identity_change_constraint_exception(domain)
#
define(`kernel_make_object_identity_change_constraint_exception',`
requires_block_template(`$0'_depend)
typeattribute $1 can_change_object_identity;
')
define(`kernel_make_object_identity_change_constraint_exception_depend',`
attribute can_change_object_identity;
')
2005-04-14 20:18:17 +00:00
########################################
#
# kernel_load_module(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_load_module',`
requires_block_template(`$0'_depend)
allow $1 self:capability sys_module;
typeattribute $1 can_load_kernmodule;
2005-04-14 20:18:17 +00:00
')
define(`kernel_load_module_depend',`
attribute can_load_kernmodule;
class capability sys_module;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_get_selinux_enforcement_mode(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_get_selinux_enforcement_mode',`
requires_block_template(`$0'_depend)
allow $1 security_t:dir { read search getattr };
allow $1 security_t:file { getattr read };
2005-04-14 20:18:17 +00:00
')
define(`kernel_get_selinux_enforcement_mode_depend',`
type security_t;
class dir { read search getattr };
class file { getattr read };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_set_selinux_enforcement_mode(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_set_selinux_enforcement_mode',`
requires_block_template(`$0'_depend)
allow $1 security_t:dir { read search getattr };
allow $1 security_t:file { getattr read write };
allow $1 security_t:security setenforce;
auditallow $1 security_t:security setenforce;
typeattribute $1 can_setenforce;
2005-04-14 20:18:17 +00:00
')
define(`kernel_set_selinux_enforcement_mode_depend',`
type security_t;
attribute can_setenforce;
class dir { read search getattr };
class file { getattr read write };
class security setenforce;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_load_selinux_policy(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_load_selinux_policy',`
requires_block_template(`$0'_depend)
allow $1 security_t:dir { read search getattr };
allow $1 security_t:file { getattr read write };
allow $1 security_t:security load_policy;
auditallow $1 security_t:security load_policy;
typeattribute $1 can_load_policy;
2005-04-14 20:18:17 +00:00
')
define(`kernel_load_selinux_policy_depend',`
type security_t;
attribute can_load_policy;
class dir { read search getattr };
class file { getattr read write };
class security load_policy;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_set_selinux_boolean(domain,[booltype])
2005-04-14 20:18:17 +00:00
#
define(`kernel_set_selinux_boolean',`
requires_block_template(`$0'_depend)
ifelse(`$2',`',`
allow $1 security_t:dir { getattr search read };
allow $1 security_t:file { getattr read write };
',`
allow $1 $2:dir { getattr search read };
allow $1 $2:file { getattr read write };
')
allow $1 security_t:dir search;
allow $1 security_t:security setbool;
auditallow $1 security_t:security setbool;
2005-04-14 20:18:17 +00:00
')
define(`kernel_set_selinux_boolean_depend',`
type security_t;
class dir { read search getattr };
class file { getattr read write };
class security setbool;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_set_selinux_security_parameters(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_set_selinux_security_parameters',`
requires_block_template(`$0'_depend)
allow $1 security_t:dir { read search getattr };
allow $1 security_t:file { getattr read write };
allow $1 security_t:security setsecparam;
auditallow $1 security_t:security setsecparam;
typeattribute $1 can_setsecparam;
2005-04-14 20:18:17 +00:00
')
define(`kernel_set_selinux_security_parameters_depend',`
type security_t;
attribute can_setsecparam;
class dir { read search getattr };
class file { getattr read write };
class security setsecparam;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_validate_selinux_context(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_validate_selinux_context',`
requires_block_template(`$0'_depend)
allow $1 security_t:dir { read search getattr };
allow $1 security_t:file { getattr read write };
allow $1 security_t:security check_context;
2005-04-14 20:18:17 +00:00
')
define(`kernel_validate_selinux_context_depend',`
type security_t;
class dir { read search getattr };
class file { getattr read write };
class security check_context;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_compute_selinux_access_vector(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_compute_selinux_access_vector',`
requires_block_template(`$0'_depend)
allow $1 security_t:dir { read search getattr };
allow $1 security_t:file { getattr read write };
allow $1 security_t:security compute_av;
2005-04-14 20:18:17 +00:00
')
define(`kernel_compute_selinux_access_vector_depend',`
type security_t;
class dir { read search getattr };
class file { getattr read write };
class security compute_av;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_compute_selinux_create_context(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_compute_selinux_create_context',`
requires_block_template(`$0'_depend)
allow $1 security_t:dir { read search getattr };
allow $1 security_t:file { getattr read write };
allow $1 security_t:security compute_create;
2005-04-14 20:18:17 +00:00
')
define(`kernel_compute_selinux_create_context_depend',`
type security_t;
class dir { read search getattr };
class file { getattr read write };
class security compute_create;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_compute_selinux_relabel_context(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_compute_selinux_relabel_context',`
requires_block_template(`$0'_depend)
allow $1 security_t:dir { read search getattr };
allow $1 security_t:file { getattr read write };
allow $1 security_t:security compute_relabel;
2005-04-14 20:18:17 +00:00
')
define(`kernel_compute_selinux_relabel_context_depend',`
type security_t;
class dir { read search getattr };
class file { getattr read write };
class security compute_relabel;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_compute_selinux_reachable_user_contexts(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_compute_selinux_reachable_user_contexts',`
requires_block_template(`$0'_depend)
allow $1 security_t:dir { read search getattr };
allow $1 security_t:file { getattr read write };
allow $1 security_t:security compute_user;
2005-04-14 20:18:17 +00:00
')
define(`kernel_compute_selinux_reachable_user_contexts_depend',`
type security_t;
class dir { read search getattr };
class file { getattr read write };
class security compute_user;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_read_ring_buffer(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_read_ring_buffer',`
requires_block_template(`$0'_depend)
allow $1 kernel_t:system syslog_read;
2005-04-14 20:18:17 +00:00
')
define(`kernel_read_ring_buffer_depend',`
type kernel_t;
class system syslog_read;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_ignore_read_ring_buffer(domain)
#
define(`kernel_ignore_read_ring_buffer',`
requires_block_template(`$0'_depend)
dontaudit $1 kernel_t:system syslog_read;
')
define(`kernel_ignore_read_ring_buffer_depend',`
type kernel_t;
class system syslog_read;
')
2005-04-14 20:18:17 +00:00
########################################
#
# kernel_change_ring_buffer_level(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_change_ring_buffer_level',`
requires_block_template(`$0'_depend)
allow $1 kernel_t:system syslog_console;
2005-04-14 20:18:17 +00:00
')
define(`kernel_change_ring_buffer_level_depend',`
type kernel_t;
class system syslog_console;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_clear_ring_buffer(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_clear_ring_buffer',`
requires_block_template(`$0'_depend)
allow $1 kernel_t:system syslog_mod;
2005-04-14 20:18:17 +00:00
')
define(`kernel_clear_ring_buffer_depend',`
type kernel_t;
class system syslog_mod;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_get_sysvipc_info(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_get_sysvipc_info',`
requires_block_template(`$0'_depend)
allow $1 kernel_t:system ipc_info;
2005-04-14 20:18:17 +00:00
')
define(`kernel_get_sysvipc_info_depend',`
type kernel_t;
class system ipc_info;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_get_selinuxfs_mount_point(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_get_selinuxfs_mount_point',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 proc_t:{ file lnk_file } read;
allow $1 self:dir search;
allow $1 self:file { getattr read };
2005-04-14 20:18:17 +00:00
')
define(`kernel_get_selinuxfs_mount_point_depend',`
type proc_t;
class dir search;
class lnk_file read;
class file { getattr read };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_read_system_state(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_read_system_state',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir r_dir_perms;
allow $1 proc_t:lnk_file { getattr read };
allow $1 proc_t:file r_file_perms;
2005-04-14 20:18:17 +00:00
')
define(`kernel_read_system_state_depend',`
type proc_t;
class dir r_dir_perms;
class lnk_file { getattr read };
class file r_file_perms;
2005-04-14 20:18:17 +00:00
')
2005-05-02 18:42:33 +00:00
########################################
#
# kernel_ignore_read_system_state(domain)
#
define(`kernel_ignore_read_system_state',`
requires_block_template(`$0'_depend)
allow $1 proc_t:file read;
2005-05-02 18:42:33 +00:00
')
define(`kernel_ignore_read_system_state_depend',`
type proc_t;
class file read;
2005-05-02 18:42:33 +00:00
')
2005-04-14 20:18:17 +00:00
#######################################
#
# kernel_read_software_raid_state(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_read_software_raid_state',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir { getattr search read };
allow $1 proc_mdstat_t:file { getattr read };
2005-04-14 20:18:17 +00:00
')
define(`kernel_read_software_raid_state_depend',`
type proc_t, proc_mdstat_t;
class dir { search getattr read };
class file { getattr read };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_get_core_interface_attributes(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_get_core_interface_attributes',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir { getattr search read };
allow $1 proc_kcore_t:file getattr;
2005-04-14 20:18:17 +00:00
')
define(`kernel_get_core_interface_attributes_depend',`
type proc_t, proc_kcore_t;
class dir { search getattr read };
class file getattr;
2005-04-14 20:18:17 +00:00
')
2005-05-13 14:37:13 +00:00
########################################
#
# kernel_ignore_get_core_interface_attributes(domain)
#
define(`kernel_ignore_get_core_interface_attributes',`
requires_block_template(`$0'_depend)
dontaudit $1 proc_kcore_t:file getattr;
2005-05-13 14:37:13 +00:00
')
define(`kernel_ignore_get_core_interface_attributes_depend',`
type proc_kcore_t;
class file getattr;
2005-05-13 14:37:13 +00:00
')
########################################
#
# kernel_read_messages(domain)
#
define(`kernel_read_messages',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 proc_kmsg_t:file { getattr read };
typeattribute $1 can_receive_kernel_messages;
')
define(`kernel_read_messages_depend',`
attribute can_receive_kernel_messages;
type proc_kmsg_t, proc_t;
class dir search;
class file { getattr read };
')
########################################
#
# kernel_get_message_interface_attributes(domain)
#
define(`kernel_get_message_interface_attributes',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 proc_kmsg_t:file getattr;
')
define(`kernel_get_message_interface_attributes_depend',`
type proc_kmsg_t, proc_t;
class dir search;
class file getattr;
')
2005-04-14 20:18:17 +00:00
########################################
#
# kernel_ignore_get_message_interface_attributes(domain)
#
define(`kernel_ignore_get_message_interface_attributes',`
requires_block_template(`$0'_depend)
dontaudit $1 proc_kmsg_t:file getattr;
')
define(`kernel_ignore_get_message_interface_attributes_depend',`
type proc_kmsg_t, proc_t;
class file getattr;
')
########################################
2005-04-14 20:18:17 +00:00
#
# kernel_read_network_state(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_read_network_state',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 proc_net_t:dir { getattr search read };
allow $1 proc_net_t:file { getattr read };
2005-04-14 20:18:17 +00:00
')
define(`kernel_read_network_state_depend',`
type proc_t, proc_net_t;
class dir { search getattr read };
class file { getattr read };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_ignore_search_sysctl_dir(domain)
#
define(`kernel_ignore_search_sysctl_dir',`
requires_block_template(`$0'_depend)
dontaudit $1 sysctl_t:dir search;
')
define(`kernel_ignore_search_sysctl_dir_depend',`
type sysctl_t;
class dir search;
')
2005-04-14 20:18:17 +00:00
########################################
#
# kernel_read_device_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_read_device_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_t:dir { getattr search read };
allow $1 sysctl_dev_t:dir { getattr search read };
allow $1 sysctl_dev_t:file { getattr read };
2005-04-14 20:18:17 +00:00
')
define(`kernel_read_device_sysctl_depend',`
type proc_t, sysctl_t, sysctl_dev_t;
class dir { search getattr read };
class file { getattr read };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_modify_device_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_modify_device_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_t:dir { getattr search read };
allow $1 sysctl_dev_t:file { getattr read write };
2005-04-14 20:18:17 +00:00
')
define(`kernel_modify_device_sysctl_depend',`
type proc_t, sysctl_t, sysctl_dev_t;
class dir { search getattr read };
class file { getattr read write };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_read_virtual_memory_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_read_virtual_memory_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_t:dir { getattr search read };
allow $1 sysctl_vm_t:file { getattr read };
2005-04-14 20:18:17 +00:00
')
define(`kernel_read_virtual_memory_sysctl_depend',`
type proc_t, sysctl_t, sysctl_vm_t;
class dir { search getattr read };
class file { getattr read };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_modify_virtual_memory_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_modify_virtual_memory_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_t:dir { getattr search read };
allow $1 sysctl_vm_t:file { getattr read write };
2005-04-14 20:18:17 +00:00
')
define(`kernel_modify_virtual_memory_sysctl_depend',`
type proc_t, sysctl_t, sysctl_vm_t;
class dir { search getattr read };
class file { getattr read write };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_ignore_search_network_sysctl_dir(domain)
#
define(`kernel_ignore_search_network_sysctl_dir',`
requires_block_template(`$0'_depend)
dontaudit $1 sysctl_net_t:dir search;
')
define(`kernel_ignore_search_network_sysctl_dir_depend',`
type sysctl_net_t;
class dir search;
')
2005-04-14 20:18:17 +00:00
########################################
#
# kernel_read_network_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_read_network_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_t:dir { getattr search read };
allow $1 sysctl_net_t:dir { getattr search read };
allow $1 sysctl_net_t:file { getattr read };
2005-04-14 20:18:17 +00:00
')
define(`kernel_read_network_sysctl_depend',`
type proc_t, sysctl_t, sysctl_net_t;
class dir { search getattr read };
class file { getattr read };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_modify_network_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_modify_network_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_t:dir { getattr search read };
allow $1 sysctl_net_t:dir { getattr search read };
allow $1 sysctl_net_t:file { getattr read write };
2005-04-14 20:18:17 +00:00
')
define(`kernel_modify_network_sysctl_depend',`
type proc_t, sysctl_t, sysctl_net_t;
class dir { search getattr read };
class file { getattr read write };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_read_unix_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_read_unix_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_t:dir { getattr search read };
allow $1 sysctl_net_t:dir { getattr search read };
allow $1 sysctl_net_unix_t:file { getattr read };
2005-04-14 20:18:17 +00:00
')
define(`kernel_read_net_sysctl_depend',`
type proc_t, sysctl_t, sysctl_net_t, sysctl_net_unix_t;
class dir { search getattr read };
class file { getattr read };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_modify_unix_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_modify_unix_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_t:dir { getattr search read };
allow $1 sysctl_net_t:dir { getattr search read };
allow $1 sysctl_net_unix_t:file { getattr read write };
2005-04-14 20:18:17 +00:00
')
define(`kernel_modify_net_sysctl_depend',`
type proc_t, sysctl_t, sysctl_net_t, sysctl_net_unix_t;
class dir { search getattr read };
class file { getattr read write };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_read_hotplug_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_read_hotplug_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_t:dir { getattr search read };
allow $1 sysctl_kernel_t:dir { getattr search read };
allow $1 sysctl_hotplug_t:file { getattr read };
2005-04-14 20:18:17 +00:00
')
define(`kernel_read_hotplug_sysctl_depend',`
type proc_t, sysctl_t, sysctl_kernel_t, sysctl_hotplug_t;
class dir { search getattr read };
class file { getattr read };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_modify_hotplug_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_modify_hotplug_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_t:dir { getattr search read };
allow $1 sysctl_kernel_t:dir { getattr search read };
allow $1 sysctl_hotplug_t:file { getattr read write };
2005-04-14 20:18:17 +00:00
')
define(`kernel_modify_hotplug_sysctl_depend',`
type proc_t, sysctl_t, sysctl_kernel_t, sysctl_hotplug_t;
class dir { search getattr read };
class file { getattr read write };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_read_modprobe_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_read_modprobe_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_t:dir { getattr search read };
allow $1 sysctl_kernel_t:dir { getattr search read };
allow $1 sysctl_modprobe_t:file { getattr read };
2005-04-14 20:18:17 +00:00
')
define(`kernel_read_modprobe_sysctl_depend',`
type proc_t, sysctl_t, sysctl_kernel_t, sysctl_modprobe_t;
class dir { search getattr read };
class file { getattr read };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_modify_modprobe_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_modify_modprobe_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_t:dir { getattr search read };
allow $1 sysctl_kernel_t:dir { getattr search read };
allow $1 sysctl_modprobe_t:file { getattr read write };
2005-04-14 20:18:17 +00:00
')
define(`kernel_modify_modprobe_sysctl_depend',`
type proc_t, sysctl_t, sysctl_kernel_t, sysctl_modprobe_t;
class dir { search getattr read };
class file { getattr read write };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_read_kernel_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_read_kernel_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_t:dir { getattr search read };
allow $1 sysctl_kernel_t:dir { getattr search read };
allow $1 sysctl_kernel_t:file { getattr read };
2005-04-14 20:18:17 +00:00
')
define(`kernel_read_kernel_sysctl_depend',`
type proc_t, sysctl_t, sysctl_kernel_t;
class dir { search getattr read };
class file { getattr read };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_modify_kernel_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_modify_kernel_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_t:dir { getattr search read };
allow $1 sysctl_kernel_t:dir { getattr search read };
allow $1 sysctl_kernel_t:file { getattr read write };
2005-04-14 20:18:17 +00:00
')
define(`kernel_modify_kernel_sysctl_depend',`
type proc_t, sysctl_t, sysctl_kernel_t;
class dir { search getattr read };
class file { getattr read write };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_read_filesystem_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_read_filesystem_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_t:dir { getattr search read };
allow $1 sysctl_fs_t:dir { getattr search read };
allow $1 sysctl_fs_t:file { getattr read };
2005-04-14 20:18:17 +00:00
')
define(`kernel_read_filesystem_sysctl_depend',`
type proc_t, sysctl_t, sysctl_fs_t;
class dir { search getattr read };
class file { getattr read };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_modify_filesystem_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_modify_filesystem_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_t:dir { getattr search read };
allow $1 sysctl_fs_t:dir { getattr search read };
allow $1 sysctl_fs_t:file { getattr read write };
2005-04-14 20:18:17 +00:00
')
define(`kernel_modify_filesystem_sysctl_depend',`
type proc_t, sysctl_t, sysctl_fs_t;
class dir { search getattr read };
class file { getattr read write };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_read_irq_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_read_irq_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_irq_t:dir { getattr search read };
allow $1 sysctl_irq_t:file { getattr read };
2005-04-14 20:18:17 +00:00
')
define(`kernel_read_irq_sysctl_depend',`
type proc_t, sysctl_irq_t;
class dir { search getattr read };
class file { getattr read };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_modify_irq_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_modify_irq_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 sysctl_irq_t:dir { getattr search read };
allow $1 sysctl_irq_t:file { getattr read write };
2005-04-14 20:18:17 +00:00
')
define(`kernel_modify_irq_sysctl_depend',`
type proc_t, sysctl_irq_t;
class dir { search getattr read };
class file { getattr read write };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_read_rpc_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_read_rpc_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 proc_net_t:dir search;
allow $1 sysctl_rpc_t:dir { getattr search read };
allow $1 sysctl_rpc_t:file { getattr read };
2005-04-14 20:18:17 +00:00
')
define(`kernel_read_rpc_sysctl_depend',`
type proc_t, proc_net_t, sysctl_rpc_t;
class dir { search getattr read };
class file { getattr read };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_modify_rpc_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_modify_rpc_sysctl',`
requires_block_template(`$0'_depend)
allow $1 proc_t:dir search;
allow $1 proc_net_t:dir search;
allow $1 sysctl_rpc_t:dir { getattr search read };
allow $1 sysctl_rpc_t:file { getattr read write };
2005-04-14 20:18:17 +00:00
')
define(`kernel_modify_rpc_sysctl_depend',`
type proc_t, proc_net_t, sysctl_rpc_t;
class dir { search getattr read };
class file { getattr read write };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_read_all_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_read_all_sysctl',`
kernel_read_device_sysctl($1)
kernel_read_virtual_memory_sysctl($1)
kernel_read_network_sysctl($1)
kernel_read_unix_sysctl($1)
kernel_read_hotplug_sysctl($1)
kernel_read_modprobe_sysctl($1)
kernel_read_kernel_sysctl($1)
kernel_read_filesystem_sysctl($1)
kernel_read_irq_sysctl($1)
kernel_read_rpc_sysctl($1)
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_modify_all_sysctl(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_modify_all_sysctl',`
kernel_modify_device_sysctl($1)
kernel_modify_virtual_memory_sysctl($1)
kernel_modify_network_sysctl($1)
kernel_modify_unix_sysctl($1)
kernel_modify_hotplug_sysctl($1)
kernel_modify_modprobe_sysctl($1)
kernel_modify_kernel_sysctl($1)
kernel_modify_filesystem_sysctl($1)
kernel_modify_irq_sysctl($1)
kernel_modify_rpc_sysctl($1)
2005-05-30 21:17:20 +00:00
')
########################################
## <interface name="kernel_search_hardware_state_dir">
## <description>
## Search the directory containing hardware information.
## </description>
## <parameter name="domain">
## The type of the process performing this action.
## </parameter>
## <infoflow type="read" weight="10"/>
## </interface>
#
define(`kernel_search_hardware_state_dir',`
requires_block_template(`$0'_depend)
allow $1 sysfs_t:dir search;
2005-04-14 20:18:17 +00:00
')
2005-05-30 21:17:20 +00:00
define(`kernel_search_hardware_state_dir_depend',`
type sysfs_t;
class dir search;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_read_hardware_state(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_read_hardware_state',`
requires_block_template(`$0'_depend)
allow $1 sysfs_t:dir { getattr search read };
allow $1 sysfs_t:{ file lnk_file } { getattr read };
2005-04-14 20:18:17 +00:00
')
define(`kernel_read_hardware_state_depend',`
type sysfs_t;
class dir { getattr search read };
class file { getattr read };
class lnk_file { getattr read };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_modify_hardware_config_option(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_modify_hardware_config_option',`
requires_block_template(`$0'_depend)
allow $1 sysfs_t:dir { getattr search read };
allow $1 sysfs_t:lnk_file { getattr read };
allow $1 sysfs_t:file { getattr read write };
2005-04-14 20:18:17 +00:00
')
define(`kernel_modify_hardware_config_option_depend',`
type sysfs_t;
class dir { getattr search read };
class file { getattr read write };
class lnk_file { getattr read };
2005-04-14 20:18:17 +00:00
')
2005-05-27 20:44:05 +00:00
########################################
## <interface name="kernel_kill_unlabeled_process">
## <description>
## Send a kill signal to unlabeled processes.
## </description>
## <parameter name="domain">
## The type of the process performing this action.
## </parameter>
## <infoflow type="write" weight="1"/>
## </interface>
#
define(`kernel_kill_unlabeled_process',`
requires_block_template(`$0'_depend)
allow $1 unlabeled_t:process sigkill;
2005-05-27 20:44:05 +00:00
')
define(`kernel_kill_unlabeled_process_depend',`
type unlabeled_t;
class process sigkill;
2005-05-27 20:44:05 +00:00
')
########################################
## <interface name="kernel_signal_unlabeled_process">
## <description>
## Send general signals to unlabeled processes.
## </description>
## <parameter name="domain">
## The type of the process performing this action.
## </parameter>
## <infoflow type="write" weight="1"/>
## </interface>
#
define(`kernel_signal_unlabeled_process',`
requires_block_template(`$0'_depend)
allow $1 unlabeled_t:process signal;
2005-05-27 20:44:05 +00:00
')
define(`kernel_signal_unlabeled_process_depend',`
type unlabeled_t;
class process signal;
2005-05-27 20:44:05 +00:00
')
########################################
## <interface name="kernel_signull_unlabeled_process">
## <description>
## Send a null signal to unlabeled processes.
## </description>
## <parameter name="domain">
## The type of the process performing this action.
## </parameter>
## <infoflow type="write" weight="1"/>
## </interface>
#
define(`kernel_signull_unlabeled_process',`
requires_block_template(`$0'_depend)
allow $1 unlabeled_t:process signull;
2005-05-27 20:44:05 +00:00
')
define(`kernel_signull_unlabeled_process_depend',`
type unlabeled_t;
class process signull;
2005-05-27 20:44:05 +00:00
')
########################################
## <interface name="kernel_sigstop_unlabeled_process">
## <description>
## Send a stop signal to unlabeled processes.
## </description>
## <parameter name="domain">
## The type of the process performing this action.
## </parameter>
## <infoflow type="write" weight="1"/>
## </interface>
#
define(`kernel_sigstop_unlabeled_process',`
requires_block_template(`$0'_depend)
allow $1 unlabeled_t:process sigstop;
2005-05-27 20:44:05 +00:00
')
define(`kernel_sigstop_unlabeled_process_depend',`
type unlabeled_t;
class process sigstop;
2005-05-27 20:44:05 +00:00
')
########################################
## <interface name="kernel_sigchld_unlabeled_process">
## <description>
## Send a child terminated signal to unlabeled processes.
## </description>
## <parameter name="domain">
## The type of the process performing this action.
## </parameter>
## <infoflow type="write" weight="1"/>
## </interface>
#
define(`kernel_sigchld_unlabeled_process',`
requires_block_template(`$0'_depend)
allow $1 unlabeled_t:process sigchld;
2005-05-27 20:44:05 +00:00
')
define(`kernel_sigchld_unlabeled_process_depend',`
type unlabeled_t;
class process sigchld;
2005-05-27 20:44:05 +00:00
')
########################################
#
# kernel_ignore_get_unlabeled_block_device_attributes(domain)
#
define(`kernel_ignore_get_unlabeled_block_device_attributes',`
requires_block_template(`$0'_depend)
allow $1 unlabeled_t:blk_file getattr;
2005-05-27 20:44:05 +00:00
')
define(`kernel_ignore_get_unlabeled_block_device_attributes_depend',`
type unlabeled_t;
class process getattr;
2005-05-27 20:44:05 +00:00
')
########################################
#
# kernel_relabel_unlabeled_object(domain)
#
define(`kernel_relabel_unlabeled_object',`
requires_block_template(`$0'_depend)
allow $1 unlabeled_t:{ dir file lnk_file fifo_file sock_file chr_file blk_file } { getattr relabelfrom };
2005-05-27 20:44:05 +00:00
')
define(`kernel_relabel_unlabeled_object_depend',`
type unlabeled_t;
class dir { getattr relabelfrom };
class file { getattr relabelfrom };
class lnk_file { getattr relabelfrom };
class fifo_file { getattr relabelfrom };
class sock_file { getattr relabelfrom };
class chr_file { getattr relabelfrom };
class blk_file { getattr relabelfrom };
2005-05-27 20:44:05 +00:00
')
2005-05-30 21:17:20 +00:00
########################################
## <interface name="kernel_search_usb_hardware_state_dir">
## <description>
## Search the directory containing USB hardware information.
## </description>
## <parameter name="domain">
## The type of the process performing this action.
## </parameter>
## <infoflow type="read" weight="10"/>
## </interface>
#
define(`kernel_search_usb_hardware_state_dir',`
requires_block_template(`$0'_depend)
allow $1 usbfs_t:dir search;
2005-05-30 21:17:20 +00:00
')
define(`kernel_search_usb_hardware_state_dir_depend',`
type usbfs_t;
class dir search;
2005-05-30 21:17:20 +00:00
')
2005-04-14 20:18:17 +00:00
########################################
#
# kernel_list_usb_hardware(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_list_usb_hardware',`
requires_block_template(`$0'_depend)
allow $1 usbfs_t:dir { getattr search read };
allow $1 usbfs_t:lnk_file { getattr read };
allow $1 usbfs_t:file getattr;
2005-04-14 20:18:17 +00:00
')
define(`kernel_list_usb_hardware_depend',`
type usbfs_t;
class dir { getattr search read };
class file getattr;
class lnk_file { getattr read };
2005-04-14 20:18:17 +00:00
')
########################################
## <interface name="kernel_read_usb_hardware_state">
## <description>
## Read USB hardware information using
## the usbfs filesystem interface.
## </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(`kernel_read_usb_hardware_state',`
requires_block_template(`$0'_depend)
allow $1 usbfs_t:dir { getattr search read };
allow $1 usbfs_t:{ file lnk_file } { getattr read };
2005-04-14 20:18:17 +00:00
')
define(`kernel_read_usb_hardware_state_depend',`
type usbfs_t;
class dir { getattr search read };
class file { getattr read };
class lnk_file { getattr read };
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_modify_usb_hardware_config_option(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_modify_usb_hardware_config_option',`
requires_block_template(`$0'_depend)
allow $1 usbfs_t:dir { getattr search read };
allow $1 usbfs_t:lnk_file { getattr read };
allow $1 usbfs_t:file { getattr read write };
2005-04-14 20:18:17 +00:00
')
define(`kernel_modify_usb_hardware_config_option_depend',`
type usbfs_t;
class dir { getattr search read };
class file { getattr read write };
class lnk_file { getattr read };
2005-04-14 20:18:17 +00:00
')
###################################################################
# #
# These interfaces are reversed, to decouple the base module from #
# the programs that the kernel runs, such as init and insmod, so #
# the base module is self-contained. These styles of interfaces #
# should not be used anywhere else. #
# #
###################################################################
########################################
#
# kernel_sigchld_from(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_sigchld_from',`
requires_block_template(`$0'_depend)
allow kernel_t $1:process sigchld;
2005-04-14 20:18:17 +00:00
')
define(`kernel_sigchld_from_depend',`
type kernel_t;
class process sigchld;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_unlabeled_sigchld_from(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_unlabeled_sigchld_from',`
requires_block_template(`$0'_depend)
allow unlabeled_t $1:process sigchld;
2005-04-14 20:18:17 +00:00
')
define(`kernel_unlabeled_sigchld_from_depend',`
type unlabeled_t;
class process sigchld;
2005-04-14 20:18:17 +00:00
')
########################################
#
# kernel_read_directory_from(domain)
2005-04-14 20:18:17 +00:00
#
define(`kernel_read_directory_from',`
requires_block_template(`$0'_depend)
allow kernel_t $1:dir { getattr search read };
2005-04-14 20:18:17 +00:00
')
define(`kernel_read_directory_from_depend',`
type kernel_t;
class dir { getattr search read };
2005-04-14 20:18:17 +00:00
')
2005-06-01 14:17:43 +00:00
## </module>