# Copyright (C) 2005 Tresys Technology, LLC ######################################## # # kernel_system_role_change(role,[`optional']) # define(`kernel_system_role_change',` requires_block_template(kernel_system_role_change_depend,$2) allow $1 system_r; ') define(`kernel_system_role_change_depend',` role system_r; ') ######################################## # # kernel_system_role_transition(role,entrypoint,[`optional']) # define(`kernel_system_role_transition',` requires_block_template(kernel_system_role_transition_depend,$2) allow $1 system_r; role_transition $1 $2 system_r; ') define(`kernel_system_role_change_depend',` role system_r; ') ######################################## # # kernel_share_state(domain,[`optional']) # define(`kernel_share_state',` requires_block_template(kernel_share_state_depend,$2) allow kernel_t $1:process share; ') define(`kernel_share_state_depend',` type kernel_t; class process share; ') ######################################## # # kernel_use_kernel_fd(domain,[`optional']) # define(`kernel_use_kernel_fd',` requires_block_template(kernel_use_kernel_fd_depend,$2) allow $1 kernel_t:fd use; ') define(`kernel_use_kernel_fd_depend',` type kernel_t; class fd use; ') ######################################## # # kernel_make_root_filesystem_mountpoint(domain,[`optional']) # define(`kernel_make_root_filesystem_mountpoint',` requires_block_template(kernel_make_root_filesystem_mountpoint_depend,$2) allow kernel_t $1:dir mounton; ') define(`kernel_make_root_filesystem_mountpoint_depend',` type kernel_t; class dir mounton; ') ######################################## # # kernel_load_module(domain,[`optional']) # define(`kernel_load_module',` requires_block_template(kernel_load_module_depend,$2) allow $1 self:capability sys_module; typeattribute $1 can_load_kernmodule; ') define(`kernel_load_module_depend',` attribute can_load_kernmodule; class capability sys_module; ') ######################################## # # kernel_kill_unlabeled_process(domain,[`optional']) # define(`kernel_kill_unlabeled_process',` requires_block_template(kernel_kill_unlabeled_process_depend,$2) allow $1 unlabeled_t:process sigkill; ') define(`kernel_kill_unlabeled_process_depend',` type unlabeled_t; class process sigkill; ') ######################################## # # kernel_relabel_unlabeled_object(domain,[`optional']) # define(`kernel_relabel_unlabeled_object',` requires_block_template(kernel_relabel_unlabeled_object_depend,$2) allow $1 unlabeled_t:{ dir file lnk_file fifo_file sock_file chr_file blk_file } relabelfrom; typeattribute $1 can_relabel; ') define(`kernel_relabel_unlabeled_object_depend',` attribute can_relabel; type unlabeled_t; class dir relabelfrom; class file relabelfrom; class lnk_file relabelfrom; class fifo_file relabelfrom; class sock_file relabelfrom; class chr_file relabelfrom; class blk_file relabelfrom; ') ######################################## # # kernel_get_selinux_enforcement_mode(domain,[`optional']) # define(`kernel_get_selinux_enforcement_mode',` requires_block_template(kernel_get_selinux_enforcement_mode_depend,$2) allow $1 security_t:dir { read search getattr }; allow $1 security_t:file { getattr read }; ') define(`kernel_get_selinux_enforcement_mode_depend',` type security_t; class dir { read search getattr }; class file { getattr read }; ') ######################################## # # kernel_set_selinux_enforcement_mode(domain,[`optional']) # define(`kernel_set_selinux_enforcement_mode',` requires_block_template(kernel_set_selinux_enforcement_mode_depend,$2) 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; ') 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; ') ######################################## # # kernel_load_selinux_policy(domain,[`optional']) # define(`kernel_load_selinux_policy',` requires_block_template(kernel_load_selinux_policy_depend,$2) 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; ') 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; ') ######################################## # # kernel_set_selinux_boolean(domain,[booltype],[`optional']) # define(`kernel_set_selinux_boolean',` requires_block_template(kernel_set_selinux_boolean_depend,$3) 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; ') define(`kernel_set_selinux_boolean_depend',` type security_t; class dir { read search getattr }; class file { getattr read write }; class security setbool; ') ######################################## # # kernel_setsecparam(domain,[`optional']) # define(`kernel_security_setsecparam',` requires_block_template(kernel_setsecparam_depend,$2) 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; ') define(`kernel_setsecparam_depend',` type security_t; attribute can_setsecparam; class dir { read search getattr }; class file { getattr read write }; class security setsecparam; ') ######################################## # # kernel_validate_selinux_context(domain,[`optional']) # define(`kernel_validate_selinux_context',` requires_block_template(kernel_validate_selinux_context_depend,$2) allow $1 security_t:dir { read search getattr }; allow $1 security_t:file { getattr read write }; allow $1 security_t:security check_context; ') define(`kernel_validate_selinux_context_depend',` type security_t; class dir { read search getattr }; class file { getattr read write }; class security check_context; ') ######################################## # # kernel_compute_selinux_av(domain,[`optional']) # define(`kernel_compute_selinux_av',` requires_block_template(kernel_compute_selinux_av_depend) allow $1 security_t:dir { read search getattr }; allow $1 security_t:file { getattr read write }; allow $1 security_t:security compute_av; ') define(`kernel_compute_selinux_av_depend',` type security_t; class dir { read search getattr }; class file { getattr read write }; class security compute_av; ') ######################################## # # kernel_compute_selinux_create(domain,[`optional']) # define(`kernel_compute_create',` requires_block_template(kernel_compute_create_depend,$2) allow $1 security_t:dir { read search getattr }; allow $1 security_t:file { getattr read write }; allow $1 security_t:security compute_create; ') define(`kernel_compute_create_depend',` type security_t; class dir { read search getattr }; class file { getattr read write }; class security compute_create; ') ######################################## # # kernel_compute_relabel(domain,[`optional']) # define(`kernel_compute_relabel',` requires_block_template(kernel_compute_relabel_depend,$2) allow $1 security_t:dir { read search getattr }; allow $1 security_t:file { getattr read write }; allow $1 security_t:security compute_relabel; ') define(`kernel_compute_relabel_depend',` type security_t; class dir { read search getattr }; class file { getattr read write }; class security compute_relabel; ') ######################################## # # kernel_compute_reachable_user_contexts(domain,[`optional']) # define(`kernel_compute_reachable_user_contexts',` requires_block_template(kernel_compute_reachable_user_contexts_depend,$2) allow $1 security_t:dir { read search getattr }; allow $1 security_t:file { getattr read write }; allow $1 security_t:security compute_user; ') define(`kernel_compute_reachable_user_contexts_depend',` type security_t; class dir { read search getattr }; class file { getattr read write }; class security compute_user; ') ######################################## # # kernel_read_ring_buffer(domain,[`optional']) # define(`kernel_read_ring_buffer',` requires_block_template(kernel_read_ring_buffer_depend,$2) allow $1 kernel_t:system syslog_read; ') define(`kernel_read_ring_buffer_depend',` type kernel_t; class system syslog_read; ') ######################################## # # kernel_change_ring_buffer_level(domain,[`optional']) # define(`kernel_change_ring_buffer_level',` requires_block_template(kernel_change_ring_buffer_level_depend,$2) allow $1 kernel_t:system syslog_console; ') define(`kernel_change_ring_buffer_level_depend',` type kernel_t; class system syslog_console; ') ######################################## # # kernel_clear_ring_buffer(domain,[`optional']) # define(`kernel_clear_ring_buffer',` requires_block_template(kernel_clear_ring_buffer_depend,$2) allow $1 kernel_t:system syslog_mod; ') define(`kernel_clear_ring_buffer_depend',` type kernel_t; class system syslog_mod; ') ######################################## # # kernel_get_sysvipc_info(domain,[`optional']) # define(`kernel_get_sysvipc_info',` requires_block_template(kernel_get_sysvipc_info_depend,$2) allow $1 kernel_t:system ipc_info; ') define(`kernel_get_sysvipc_info_depend',` type kernel_t; class system ipc_info; ') ######################################## # # kernel_read_kernel_messages(domain,[`optional']) # define(`kernel_read_kernel_messages',` requires_block_template(kernel_read_kernel_messages_depend,$2) allow $1 proc_kmsg_t:file { getattr read }; typeattribute $1 can_receive_kernel_messages; ') define(`kernel_read_kenel_messages_depend',` attribute can_receive_kernel_messages; type proc_kmsg_t; class file { getattr read }; ') ######################################## # # kernel_get_selinuxfs_mount_point(domain,[`optional']) # define(`kernel_get_selinuxfs_mount_point',` requires_block_template(kernel_get_selinuxfs_mount_point_depend,$2) allow $1 proc_t:dir search; allow $1 proc_t:lnk_file read; allow $1 self:dir search; allow $1 self:file { getattr read }; ') ifdef(`kernel_get_selinuxfs_mount_point_depend',` type proc_t; class dir search; class lnk_file read; class file { getattr read }; ') ######################################## # # kernel_read_system_state(domain,[`optional']) # define(`kernel_read_system_state',` requires_block_template(kernel_read_system_state_depend,$2) allow $1 proc_t:dir { getattr search read }; allow $1 proc_t:{ lnk_file file } { getattr read }; ') ifdef(`kernel_read_system_state_depend',` type proc_t; class dir { search getattr read }; class lnk_file { getattr read }; class file { getattr read }; ') ####################################### # # kernel_read_software_raid_state(domain,[`optional']) # define(`kernel_read_software_raid_state',` requires_block_template(kernel_read_software_raid_state_depend,$2) allow $1 proc_t:dir { getattr search read }; allow $1 proc_mdstat_t:file { getattr read }; ') ifdef(`kernel_read_software_raid_state_depend',` type proc_t, proc_mdstat_t; class dir { search getattr read }; class file { getattr read }; ') ######################################## # # kernel_stat_kernel_core_interface(domain,[`optional']) # define(`kernel_stat_kernel_core_interface',` requires_block_template(kernel_stat_kernel_core_interface_depend,$2) allow $1 proc_t:dir { getattr search read }; allow $1 proc_kcore_t:file getattr; ') ifdef(`kernel_stat_kernel_core_interface_depend',` type proc_t, proc_kcore_t; class dir { search getattr read }; class file getattr; ') ######################################## # # kernel_read_network_state(domain,[`optional']) # define(`kernel_read_network_state',` requires_block_template(kernel_read_network_state_depend,$2) allow $1 proc_t:dir search; allow $1 proc_net_t:dir { getattr search read }; allow $1 proc_net_t:file { getattr read }; ') ifdef(`kernel_read_network_state_depend',` type proc_t, proc_net_t; class dir { search getattr read }; class file { getattr read }; ') ######################################## # # kernel_read_device_sysctl(domain,[`optional']) # define(`kernel_read_device_sysctl',` requires_block_template(kernel_read_device_sysctl_depend,$2) allow $1 proc_t:dir search; allow $1 sysctl_t:dir { getattr search read }; allow $1 sysctl_dev_t:file { getattr read }; ') ifdef(`kernel_read_device_sysctl_depend',` type proc_t, sysctl_t, sysctl_dev_t; class dir { search getattr read }; class file { getattr read }; ') ######################################## # # kernel_modify_device_sysctl(domain,[`optional']) # define(`kernel_modify_device_sysctl',` requires_block_template(kernel_modify_device_sysctl_depend,$2) allow $1 proc_t:dir search; allow $1 sysctl_t:dir { getattr search read }; allow $1 sysctl_dev_t:file { getattr read write }; ') ifdef(`kernel_modify_device_sysctl_depend',` type proc_t, sysctl_t, sysctl_dev_t; class dir { search getattr read }; class file { getattr read write }; ') ######################################## # # kernel_read_virtual_memory_sysctl(domain,[`optional']) # define(`kernel_read_virtual_memory_sysctl',` requires_block_template(kernel_read_virtual_memory_sysctl_depend,$2) allow $1 proc_t:dir search; allow $1 sysctl_t:dir { getattr search read }; allow $1 sysctl_vm_t:file { getattr read }; ') ifdef(`kernel_read_virtual_memory_sysctl_depend',` type proc_t, sysctl_t, sysctl_vm_t; class dir { search getattr read }; class file { getattr read }; ') ######################################## # # kernel_modify_virtual_memory_sysctl(domain,[`optional']) # define(`kernel_modify_virtual_memory_sysctl',` requires_block_template(kernel_modify_virtual_memory_sysctl_depend,$2) allow $1 proc_t:dir search; allow $1 sysctl_t:dir { getattr search read }; allow $1 sysctl_vm_t:file { getattr read write }; ') ifdef(`kernel_modify_virtual_memory_sysctl_depend',` type proc_t, sysctl_t, sysctl_vm_t; class dir { search getattr read }; class file { getattr read write }; ') ######################################## # # kernel_read_network_sysctl(domain,[`optional']) # define(`kernel_read_network_sysctl',` requires_block_template(kernel_read_network_sysctl_depend,$2) 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 }; ') ifdef(`kernel_read_network_sysctl_depend',` type proc_t, sysctl_t, sysctl_net_t; class dir { search getattr read }; class file { getattr read }; ') ######################################## # # kernel_modify_network_sysctl(domain,[`optional']) # define(`kernel_modify_network_sysctl',` requires_block_template(kernel_modify_network_sysctl_depend,$2) 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 }; ') ifdef(`kernel_modify_network_sysctl_depend',` type proc_t, sysctl_t, sysctl_net_t; class dir { search getattr read }; class file { getattr read write }; ') ######################################## # # kernel_read_unix_sysctl(domain,[`optional']) # define(`kernel_read_unix_sysctl',` requires_block_template(kernel_read_unix_sysctl_depend,$2) 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 }; ') ifdef(`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 }; ') ######################################## # # kernel_modify_unix_sysctl(domain,[`optional']) # define(`kernel_modify_unix_sysctl',` requires_block_template(kernel_modify_unix_sysctl_depend,$2) 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 }; ') ifdef(`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 }; ') ######################################## # # kernel_read_hotplug_sysctl(domain,[`optional']) # define(`kernel_read_hotplug_sysctl',` requires_block_template(kernel_read_hotplug_sysctl_depend,$2) 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 }; ') ifdef(`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 }; ') ######################################## # # kernel_modify_hotplug_sysctl(domain,[`optional']) # define(`kernel_modify_hotplug_sysctl',` requires_block_template(kernel_modify_hotplug_sysctl_depend,$2) 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 }; ') ifdef(`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 }; ') ######################################## # # kernel_read_modprobe_sysctl(domain,[`optional']) # define(`kernel_read_modprobe_sysctl',` requires_block_template(kernel_read_modprobe_sysctl_depend,$2) 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 }; ') ifdef(`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 }; ') ######################################## # # kernel_modify_modprobe_sysctl(domain,[`optional']) # define(`kernel_modify_modprobe_sysctl',` requires_block_template(kernel_modify_modprobe_sysctl_depend,$2) 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 }; ') ifdef(`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 }; ') ######################################## # # kernel_read_kernel_sysctl(domain,[`optional']) # define(`kernel_read_kernel_sysctl',` requires_block_template(kernel_read_kernel_sysctl_depend,$2) 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 }; ') ifdef(`kernel_read_kernel_sysctl_depend',` type proc_t, sysctl_t, sysctl_kernel_t; class dir { search getattr read }; class file { getattr read }; ') ######################################## # # kernel_modify_kernel_sysctl(domain,[`optional']) # define(`kernel_modify_kernel_sysctl',` requires_block_template(kernel_modify_kernel_sysctl_depend,$2) 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 }; ') ifdef(`kernel_modify_kernel_sysctl_depend',` type proc_t, sysctl_t, sysctl_kernel_t; class dir { search getattr read }; class file { getattr read write }; ') ######################################## # # kernel_read_filesystem_sysctl(domain,[`optional']) # define(`kernel_read_filesystem_sysctl',` requires_block_template(kernel_read_filesystem_sysctl_depend,$2) 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 }; ') ifdef(`kernel_read_filesystem_sysctl_depend',` type proc_t, sysctl_t, sysctl_fs_t; class dir { search getattr read }; class file { getattr read }; ') ######################################## # # kernel_modify_filesystem_sysctl(domain,[`optional']) # define(`kernel_modify_filesystem_sysctl',` requires_block_template(kernel_modify_filesystem_sysctl_depend,$2) 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 }; ') ifdef(`kernel_modify_filesystem_sysctl_depend',` type proc_t, sysctl_t, sysctl_fs_t; class dir { search getattr read }; class file { getattr read write }; ') ######################################## # # kernel_read_irq_sysctl(domain,[`optional']) # define(`kernel_read_irq_sysctl',` requires_block_template(kernel_read_irq_sysctl_depend,$2) allow $1 proc_t:dir search; allow $1 sysctl_irq_t:dir { getattr search read }; allow $1 sysctl_irq_t:file { getattr read }; ') ifdef(`kernel_read_irq_sysctl_depend',` type proc_t, sysctl_irq_t; class dir { search getattr read }; class file { getattr read }; ') ######################################## # # kernel_modify_irq_sysctl(domain,[`optional']) # define(`kernel_modify_irq_sysctl',` requires_block_template(kernel_modify_irq_sysctl_depend,$2) allow $1 proc_t:dir search; allow $1 sysctl_irq_t:dir { getattr search read }; allow $1 sysctl_irq_t:file { getattr read write }; ') ifdef(`kernel_modify_irq_sysctl_depend',` type proc_t, sysctl_irq_t; class dir { search getattr read }; class file { getattr read write }; ') ######################################## # # kernel_read_rpc_sysctl(domain,[`optional']) # define(`kernel_read_rpc_sysctl',` requires_block_template(kernel_read_rpc_sysctl_depend,$2) 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 }; ') ifdef(`kernel_read_rpc_sysctl_depend',` type proc_t, proc_net_t, sysctl_rpc_t; class dir { search getattr read }; class file { getattr read }; ') ######################################## # # kernel_modify_rpc_sysctl(domain,[`optional']) # define(`kernel_modify_rpc_sysctl',` requires_block_template(kernel_modify_rpc_sysctl_depend,$2) 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 }; ') ifdef(`kernel_modify_rpc_sysctl_depend',` type proc_t, proc_net_t, sysctl_rpc_t; class dir { search getattr read }; class file { getattr read write }; ') ######################################## # # kernel_read_all_sysctl(domain,[`optional']) # define(`kernel_read_all_sysctl',` requires_block_template(kernel_read_all_sysctl_depend,$2) kernel_read_device_sysctl($1,optional) kernel_read_virtual_memory_sysctl($1,optional) kernel_read_network_sysctl($1,optional) kernel_read_unix_sysctl($1,optional) kernel_read_hotplug_sysctl($1,optional) kernel_read_modprobe_sysctl($1,optional) kernel_read_kernel_sysctl($1,optional) kernel_read_filesystem_sysctl($1,optional) kernel_read_irq_sysctl($1,optional) kernel_read_rpc_sysctl($1,optional) ') ifdef(`kernel_read_all_sysctl_depend',` kernel_read_device_sysctl_depend kernel_read_virtual_memory_sysctl_depend kernel_read_network_sysctl_depend kernel_read_unix_sysctl_depend kernel_read_hotplug_sysctl_depend kernel_read_modprobe_sysctl_depend kernel_read_kernel_sysctl_depend kernel_read_filesystem_sysctl_depend kernel_read_irq_sysctl_depend kernel_read_rpc_sysctl_depend ') ######################################## # # kernel_modify_all_sysctl(domain,[`optional']) # define(`kernel_modify_all_sysctl',` requires_block_template(kernel_modify_all_sysctl_depend,$2) kernel_modify_device_sysctl($1,optional) kernel_modify_virtual_memory_sysctl($1,optional) kernel_modify_network_sysctl($1,optional) kernel_modify_unix_sysctl($1,optional) kernel_modify_hotplug_sysctl($1,optional) kernel_modify_modprobe_sysctl($1,optional) kernel_modify_kernel_sysctl($1,optional) kernel_modify_filesystem_sysctl($1,optional) kernel_modify_irq_sysctl($1,optional) kernel_modify_rpc_sysctl($1,optional) ') ifdef(`kernel_modify_all_sysctl_depend',` kernel_modify_device_sysctl_depend kernel_modify_virtual_memory_sysctl_depend kernel_modify_network_sysctl_depend kernel_modify_unix_sysctl_depend kernel_modify_hotplug_sysctl_depend kernel_modify_modprobe_sysctl_depend kernel_modify_kernel_sysctl_depend kernel_modify_filesystem_sysctl_depend kernel_modify_irq_sysctl_depend kernel_modify_rpc_sysctl_depend ') ######################################## # # kernel_read_hardware_state(domain,[`optional']) # define(`kernel_read_hardware_state',` requires_block_template(kernel_read_hardware_state_depend,$2) allow $1 sysfs_t:dir { getattr search read }; allow $1 sysfs_t:{ file lnk_file } { getattr read }; ') define(`kernel_read_hardware_state_depend',` type sysfs_t; class dir { getattr search read }; class file { getattr read }; class lnk_file { getattr read }; ') ######################################## # # kernel_modify_hardware_config_option(domain,[`optional']) # define(`kernel_modify_hardware_config_option',` requires_block_template(kernel_modify_hardware_config_option_depend,$2) allow $1 sysfs_t:dir { getattr search read }; allow $1 sysfs_t:lnk_file { getattr read }; allow $1 sysfs_t:file { getattr read write }; ') 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 }; ') ######################################## # # kernel_list_usb_hardware(domain,[`optional']) # define(`kernel_list_usb_hardware',` requires_block_template(kernel_list_usb_hardware_depend,$2) allow $1 usbfs_t:dir { getattr search read }; allow $1 usbfs_t:lnk_file { getattr read }; allow $1 usbfs_t:file getattr; ') define(`kernel_list_usb_hardware_depend',` type usbfs_t; class dir { getattr search read }; class file getattr; class lnk_file { getattr read }; ') ######################################## # # kernel_read_usb_hardware_state(domain,[`optional']) # define(`kernel_read_usb_hardware_state',` requires_block_template(kernel_read_usb_hardware_state_depend,$2) allow $1 usbfs_t:dir { getattr search read }; allow $1 usbfs_t:{ file lnk_file } { getattr read }; ') define(`kernel_read_usb_hardware_state_depend',` type usbfs_t; class dir { getattr search read }; class file { getattr read }; class lnk_file { getattr read }; ') ######################################## # # kernel_modify_usb_hardware_config_option(domain,[`optional']) # define(`kernel_modify_usb_hardware_config_option',` requires_block_template(kernel_modify_usb_hardware_config_option_depend,$2) allow $1 usbfs_t:dir { getattr search read }; allow $1 usbfs_t:lnk_file { getattr read }; allow $1 usbfs_t:file { getattr read write }; ') 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 }; ') ################################################################### # # # 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_transition_from(domain,entrypoint,[`optional']) # define(`kernel_transition_from',` requires_block_template(kernel_transition_from_depend,$3) allow kernel_t $2:file { getattr read execute }; allow kernel_t $1:process transition; type_transition kernel_t $2:process $1; dontaudit kernel_t $1:process { noatsecure siginh rlimitinh }; ') define(`kernel_transition_from_depend',` type kernel_t; class file { getattr read execute }; class process transition; ') ######################################## # # kernel_sigchld_from(domain,[`optional']) # define(`kernel_sigchld_from',` requires_block_template(kernel_sigchld_from_depend,$2) allow kernel_t $1:process sigchld; ') define(`kernel_sigchld_from_depend',` type kernel_t; class process sigchld; ') ######################################## # # kernel_unlabeled_sigchld_from(domain,[`optional']) # define(`kernel_unlabeled_sigchld_from',` requires_block_template(kernel_unlabeled_sigchld_from_depend,$2) allow unlabeled_t $1:process sigchld; ') define(`kernel_unlabeled_sigchld_from_depend',` type unlabeled_t; class process sigchld; ') ######################################## # # kernel_read_directory_from(domain,[`optional']) # define(`kernel_read_directory_from',` requires_block_template(kernel_read_directory_from_depend,$2) allow kernel_t $1:dir { getattr search read }; ') define(`kernel_read_directory_from_depend',` type kernel_t; class dir { getattr search read }; ')