diff --git a/refpolicy/policy/modules/kernel/kernel.if b/refpolicy/policy/modules/kernel/kernel.if
index f55aa288..8e6ca0b8 100644
--- a/refpolicy/policy/modules/kernel/kernel.if
+++ b/refpolicy/policy/modules/kernel/kernel.if
@@ -1,5 +1,6 @@
##
-## Policy for kernel threads, proc filesystem,and unlabeled processes and objects.
+## Policy for kernel threads, proc filesystem,
+## and unlabeled processes and objects.
##
##
## This module has initial SIDs.
@@ -20,9 +21,6 @@
interface(`kernel_userland_entry',`
gen_require(`
type kernel_t;
- class process sigchld;
- class fifo_file rw_file_perms;
- class fd use;
')
domain_auto_trans(kernel_t, $2, $1)
@@ -49,7 +47,6 @@ interface(`kernel_userland_entry',`
interface(`kernel_rootfs_mountpoint',`
gen_require(`
type kernel_t;
- class dir mounton;
')
allow kernel_t $1:dir mounton;
@@ -66,7 +63,6 @@ interface(`kernel_rootfs_mountpoint',`
interface(`kernel_setpgid',`
gen_require(`
type kernel_t;
- class process setpgid;
')
allow $1 kernel_t:process setpgid;
@@ -83,7 +79,6 @@ interface(`kernel_setpgid',`
interface(`kernel_sigchld',`
gen_require(`
type kernel_t;
- class process sigchld;
')
allow $1 kernel_t:process sigchld;
@@ -100,7 +95,6 @@ interface(`kernel_sigchld',`
interface(`kernel_signal',`
gen_require(`
type kernel_t;
- class process signal;
')
allow kernel_t $1:process signal;
@@ -118,7 +112,6 @@ interface(`kernel_signal',`
interface(`kernel_share_state',`
gen_require(`
type kernel_t;
- class process share;
')
allow kernel_t $1:process share;
@@ -135,7 +128,6 @@ interface(`kernel_share_state',`
interface(`kernel_use_fd',`
gen_require(`
type kernel_t;
- class fd use;
')
allow $1 kernel_t:fd use;
@@ -153,7 +145,6 @@ interface(`kernel_use_fd',`
interface(`kernel_dontaudit_use_fd',`
gen_require(`
type kernel_t;
- class fd use;
')
dontaudit $1 kernel_t:fd use;
@@ -170,7 +161,6 @@ interface(`kernel_dontaudit_use_fd',`
interface(`kernel_rw_pipe',`
gen_require(`
type kernel_t;
- class fifo_file { read write };
')
allow $1 kernel_t:fifo_file { read write };
@@ -187,7 +177,6 @@ interface(`kernel_rw_pipe',`
interface(`kernel_rw_unix_dgram_socket',`
gen_require(`
type kernel_t;
- class unix_dgram_socket { read write ioctl };
')
allow $1 kernel_t:unix_dgram_socket { read write ioctl };
@@ -204,7 +193,6 @@ interface(`kernel_rw_unix_dgram_socket',`
interface(`kernel_sendto_unix_dgram_socket',`
gen_require(`
type kernel_t;
- class unix_dgram_socket sendto;
')
allow $1 kernel_t:unix_dgram_socket sendto;
@@ -221,7 +209,6 @@ interface(`kernel_sendto_unix_dgram_socket',`
interface(`kernel_tcp_recvfrom',`
gen_require(`
type kernel_t;
- class tcp_socket recvfrom;
')
allow $1 kernel_t:tcp_socket recvfrom;
@@ -238,7 +225,6 @@ interface(`kernel_tcp_recvfrom',`
interface(`kernel_udp_recvfrom',`
gen_require(`
type kernel_t;
- class udp_socket recvfrom;
')
allow $1 kernel_t:udp_socket recvfrom;
@@ -255,7 +241,6 @@ interface(`kernel_udp_recvfrom',`
interface(`kernel_load_module',`
gen_require(`
attribute can_load_kernmodule;
- class capability sys_module;
')
allow $1 self:capability sys_module;
@@ -273,7 +258,6 @@ interface(`kernel_load_module',`
interface(`kernel_read_ring_buffer',`
gen_require(`
type kernel_t;
- class system syslog_read;
')
allow $1 kernel_t:system syslog_read;
@@ -290,7 +274,6 @@ interface(`kernel_read_ring_buffer',`
interface(`kernel_dontaudit_read_ring_buffer',`
gen_require(`
type kernel_t;
- class system syslog_read;
')
dontaudit $1 kernel_t:system syslog_read;
@@ -307,7 +290,6 @@ interface(`kernel_dontaudit_read_ring_buffer',`
interface(`kernel_change_ring_buffer_level',`
gen_require(`
type kernel_t;
- class system syslog_console;
')
allow $1 kernel_t:system syslog_console;
@@ -324,7 +306,6 @@ interface(`kernel_change_ring_buffer_level',`
interface(`kernel_clear_ring_buffer',`
gen_require(`
type kernel_t;
- class system syslog_mod;
')
allow $1 kernel_t:system syslog_mod;
@@ -341,7 +322,6 @@ interface(`kernel_clear_ring_buffer',`
interface(`kernel_get_sysvipc_info',`
gen_require(`
type kernel_t;
- class system ipc_info;
')
allow $1 kernel_t:system ipc_info;
@@ -456,7 +436,6 @@ interface(`kernel_read_debugfs',`
interface(`kernel_getattr_proc',`
gen_require(`
type proc_t;
- class filesystem getattr;
')
allow $1 proc_t:filesystem getattr;
@@ -473,7 +452,6 @@ interface(`kernel_getattr_proc',`
interface(`kernel_search_proc',`
gen_require(`
type proc_t;
- class dir search;
')
allow $1 proc_t:dir search;
@@ -490,7 +468,6 @@ interface(`kernel_search_proc',`
interface(`kernel_list_proc',`
gen_require(`
type proc_t;
- class dir r_dir_perms;
')
allow $1 proc_t:dir r_dir_perms;
@@ -541,8 +518,6 @@ interface(`kernel_getattr_proc_files',`
interface(`kernel_read_proc_symlinks',`
gen_require(`
type proc_t;
- class dir search;
- class lnk_file { getattr read };
')
allow $1 proc_t:dir search;
@@ -600,7 +575,6 @@ interface(`kernel_write_proc_file',`
interface(`kernel_dontaudit_read_system_state',`
gen_require(`
type proc_t;
- class file read;
')
dontaudit $1 proc_t:file read;
@@ -618,7 +592,6 @@ interface(`kernel_dontaudit_read_system_state',`
interface(`kernel_dontaudit_read_proc_symlink',`
gen_require(`
type proc_t;
- class lnk_file read;
')
dontaudit $1 proc_t:lnk_file read;
@@ -635,8 +608,6 @@ interface(`kernel_dontaudit_read_proc_symlink',`
interface(`kernel_read_software_raid_state',`
gen_require(`
type proc_t, proc_mdstat_t;
- class dir r_dir_perms;
- class file r_file_perms;
')
allow $1 proc_t:dir r_dir_perms;
@@ -654,8 +625,6 @@ interface(`kernel_read_software_raid_state',`
interface(`kernel_rw_software_raid_state',`
gen_require(`
type proc_t, proc_mdstat_t;
- class dir r_dir_perms;
- class file rw_file_perms;
')
allow $1 proc_t:dir r_dir_perms;
@@ -673,8 +642,6 @@ interface(`kernel_rw_software_raid_state',`
interface(`kernel_getattr_core',`
gen_require(`
type proc_t, proc_kcore_t;
- class dir { search getattr read };
- class file getattr;
')
allow $1 proc_t:dir r_dir_perms;
@@ -693,7 +660,6 @@ interface(`kernel_getattr_core',`
interface(`kernel_dontaudit_getattr_core',`
gen_require(`
type proc_kcore_t;
- class file getattr;
')
dontaudit $1 proc_kcore_t:file getattr;
@@ -712,8 +678,6 @@ interface(`kernel_read_messages',`
gen_require(`
attribute can_receive_kernel_messages;
type proc_kmsg_t, proc_t;
- class dir search;
- class file r_file_perms;
')
allow $1 proc_t:dir search;
@@ -733,8 +697,6 @@ interface(`kernel_read_messages',`
interface(`kernel_getattr_message_if',`
gen_require(`
type proc_kmsg_t, proc_t;
- class dir search;
- class file getattr;
')
allow $1 proc_t:dir search;
@@ -753,7 +715,6 @@ interface(`kernel_getattr_message_if',`
interface(`kernel_dontaudit_getattr_message_if',`
gen_require(`
type proc_kmsg_t, proc_t;
- class file getattr;
')
dontaudit $1 proc_kmsg_t:file getattr;
@@ -772,7 +733,6 @@ interface(`kernel_dontaudit_getattr_message_if',`
interface(`kernel_dontaudit_search_network_state',`
gen_require(`
type proc_net_t;
- class dir search;
')
dontaudit $1 proc_net_t:dir search;
@@ -827,8 +787,6 @@ interface(`kernel_read_network_state',`
interface(`kernel_read_network_state_symlinks',`
gen_require(`
type proc_t, proc_net_t;
- class dir r_dir_perms;
- class lnk_file r_file_perms;
')
allow $1 proc_t:dir search;
@@ -866,7 +824,6 @@ interface(`kernel_dontaudit_search_sysctl',`
interface(`kernel_read_sysctl',`
gen_require(`
type sysctl_t;
- class dir r_dir_perms;
')
allow $1 sysctl_t:dir r_dir_perms;
@@ -1026,8 +983,6 @@ interface(`kernel_read_net_sysctl',`
interface(`kernel_rw_net_sysctl',`
gen_require(`
type proc_t, sysctl_t, sysctl_net_t;
- class dir r_dir_perms;
- class file rw_file_perms;
')
allow $1 proc_t:dir search;
@@ -1048,8 +1003,6 @@ interface(`kernel_rw_net_sysctl',`
interface(`kernel_read_unix_sysctl',`
gen_require(`
type proc_t, sysctl_t, sysctl_net_t, sysctl_net_unix_t;
- class dir r_dir_perms;
- class file r_file_perms;
')
allow $1 proc_t:dir search;
@@ -1070,8 +1023,6 @@ interface(`kernel_read_unix_sysctl',`
interface(`kernel_rw_unix_sysctl',`
gen_require(`
type proc_t, sysctl_t, sysctl_net_t, sysctl_net_unix_t;
- class dir r_dir_perms;
- class file rw_file_perms;
')
allow $1 proc_t:dir search;
@@ -1091,8 +1042,6 @@ interface(`kernel_rw_unix_sysctl',`
interface(`kernel_read_hotplug_sysctl',`
gen_require(`
type proc_t, sysctl_t, sysctl_kernel_t, sysctl_hotplug_t;
- class dir r_dir_perms;
- class file r_file_perms;
')
allow $1 proc_t:dir search;
@@ -1112,8 +1061,6 @@ interface(`kernel_read_hotplug_sysctl',`
interface(`kernel_rw_hotplug_sysctl',`
gen_require(`
type proc_t, sysctl_t, sysctl_kernel_t, sysctl_hotplug_t;
- class dir r_dir_perms;
- class file rw_file_perms;
')
allow $1 proc_t:dir search;
@@ -1133,8 +1080,6 @@ interface(`kernel_rw_hotplug_sysctl',`
interface(`kernel_read_modprobe_sysctl',`
gen_require(`
type proc_t, sysctl_t, sysctl_kernel_t, sysctl_modprobe_t;
- class dir r_dir_perms;
- class file r_file_perms;
')
allow $1 proc_t:dir search;
@@ -1154,8 +1099,6 @@ interface(`kernel_read_modprobe_sysctl',`
interface(`kernel_rw_modprobe_sysctl',`
gen_require(`
type proc_t, sysctl_t, sysctl_kernel_t, sysctl_modprobe_t;
- class dir r_dir_perms;
- class file rw_file_perms;
')
allow $1 proc_t:dir search;
@@ -1191,8 +1134,6 @@ interface(`kernel_dontaudit_search_kernel_sysctl',`
interface(`kernel_read_kernel_sysctl',`
gen_require(`
type proc_t, sysctl_t, sysctl_kernel_t;
- class dir r_dir_perms;
- class file r_file_perms;
')
allow $1 proc_t:dir search;
@@ -1212,7 +1153,6 @@ interface(`kernel_read_kernel_sysctl',`
interface(`kernel_dontaudit_write_kernel_sysctl',`
gen_require(`
type sysctl_kernel_t;
- class file write;
')
dontaudit $1 sysctl_kernel_t:file write;
@@ -1229,8 +1169,6 @@ interface(`kernel_dontaudit_write_kernel_sysctl',`
interface(`kernel_rw_kernel_sysctl',`
gen_require(`
type proc_t, sysctl_t, sysctl_kernel_t;
- class dir r_dir_perms;
- class file rw_file_perms;
')
allow $1 proc_t:dir search;
@@ -1250,8 +1188,6 @@ interface(`kernel_rw_kernel_sysctl',`
interface(`kernel_read_fs_sysctl',`
gen_require(`
type proc_t, sysctl_t, sysctl_fs_t;
- class dir r_dir_perms;
- class file r_file_perms;
')
allow $1 proc_t:dir search;
@@ -1271,8 +1207,6 @@ interface(`kernel_read_fs_sysctl',`
interface(`kernel_rw_fs_sysctl',`
gen_require(`
type proc_t, sysctl_t, sysctl_fs_t;
- class dir r_dir_perms;
- class file rw_file_perms;
')
allow $1 proc_t:dir search;
@@ -1292,8 +1226,6 @@ interface(`kernel_rw_fs_sysctl',`
interface(`kernel_read_irq_sysctl',`
gen_require(`
type proc_t, sysctl_irq_t;
- class dir r_dir_perms;
- class file r_file_perms;
')
allow $1 proc_t:dir search;
@@ -1313,8 +1245,6 @@ interface(`kernel_read_irq_sysctl',`
interface(`kernel_rw_irq_sysctl',`
gen_require(`
type proc_t, sysctl_irq_t;
- class dir r_dir_perms;
- class file rw_file_perms;
')
allow $1 proc_t:dir search;
@@ -1329,8 +1259,6 @@ interface(`kernel_rw_irq_sysctl',`
interface(`kernel_read_rpc_sysctl',`
gen_require(`
type proc_t, proc_net_t, sysctl_rpc_t;
- class dir r_dir_perms;
- class file r_file_perms;
')
allow $1 proc_t:dir search;
@@ -1346,8 +1274,6 @@ interface(`kernel_read_rpc_sysctl',`
interface(`kernel_rw_rpc_sysctl',`
gen_require(`
type proc_t, proc_net_t, sysctl_rpc_t;
- class dir r_dir_perms;
- class file rw_file_perms;
')
allow $1 proc_t:dir search;
@@ -1368,8 +1294,6 @@ interface(`kernel_read_all_sysctl',`
gen_require(`
attribute sysctl_type;
type proc_t, proc_net_t;
- class dir r_dir_perms;
- class file r_file_perms;
')
# proc_net_t for /proc/net/rpc sysctls
@@ -1391,8 +1315,6 @@ interface(`kernel_rw_all_sysctl',`
gen_require(`
attribute sysctl_type;
type proc_t, proc_net_t;
- class dir r_dir_perms;
- class file { rw_file_perms setattr };
')
# proc_net_t for /proc/net/rpc sysctls
@@ -1413,7 +1335,6 @@ interface(`kernel_rw_all_sysctl',`
interface(`kernel_kill_unlabeled',`
gen_require(`
type unlabeled_t;
- class process sigkill;
')
allow $1 unlabeled_t:process sigkill;
@@ -1430,7 +1351,6 @@ interface(`kernel_kill_unlabeled',`
interface(`kernel_signal_unlabeled',`
gen_require(`
type unlabeled_t;
- class process signal;
')
allow $1 unlabeled_t:process signal;
@@ -1447,7 +1367,6 @@ interface(`kernel_signal_unlabeled',`
interface(`kernel_signull_unlabeled',`
gen_require(`
type unlabeled_t;
- class process signull;
')
allow $1 unlabeled_t:process signull;
@@ -1464,7 +1383,6 @@ interface(`kernel_signull_unlabeled',`
interface(`kernel_sigstop_unlabeled',`
gen_require(`
type unlabeled_t;
- class process sigstop;
')
allow $1 unlabeled_t:process sigstop;
@@ -1481,7 +1399,6 @@ interface(`kernel_sigstop_unlabeled',`
interface(`kernel_sigchld_unlabeled',`
gen_require(`
type unlabeled_t;
- class process sigchld;
')
allow $1 unlabeled_t:process sigchld;
@@ -1733,8 +1650,6 @@ interface(`kernel_unconfined',`
attribute proc_type, sysctl_type;
attribute kern_unconfined;
attribute can_load_kernmodule, can_receive_kernel_messages;
- class dir r_dir_perms;
- class file { rw_file_perms setattr };
')
allow $1 proc_type:{ dir file } *;
@@ -1776,7 +1691,6 @@ interface(`kernel_unconfined',`
interface(`kernel_sigchld_from',`
gen_require(`
type kernel_t;
- class process sigchld;
')
allow kernel_t $1:process sigchld;
@@ -1794,7 +1708,6 @@ interface(`kernel_sigchld_from',`
interface(`kernel_sigchld_from_unlabeled',`
gen_require(`
type unlabeled_t;
- class process sigchld;
')
allow unlabeled_t $1:process sigchld;
@@ -1812,7 +1725,6 @@ interface(`kernel_sigchld_from_unlabeled',`
interface(`kernel_search_from',`
gen_require(`
type kernel_t;
- class dir search;
')
allow kernel_t $1:dir search;
@@ -1830,7 +1742,6 @@ interface(`kernel_search_from',`
interface(`kernel_list_from',`
gen_require(`
type kernel_t;
- class dir r_dir_perms;
')
allow kernel_t $1:dir r_dir_perms;
@@ -1848,7 +1759,6 @@ interface(`kernel_list_from',`
interface(`kernel_read_file_from',`
gen_require(`
type kernel_t;
- class dir r_dir_perms;
')
allow kernel_t $1:file r_file_perms;
@@ -1874,9 +1784,6 @@ interface(`kernel_read_file_from',`
interface(`kernel_use_ld_so_from',`
gen_require(`
type kernel_t;
- class dir r_dir_perms;
- class lnk_file r_file_perms;
- class file rx_file_perms;
')
files_list_etc(kernel_t)
@@ -1902,8 +1809,6 @@ interface(`kernel_use_ld_so_from',`
interface(`kernel_use_shared_libs_from',`
gen_require(`
type kernel_t;
- class lnk_file r_file_perms;
- class file rx_file_perms;
')
allow kernel_t $1:dir r_dir_perms;
@@ -1929,10 +1834,6 @@ interface(`kernel_use_shared_libs_from',`
interface(`kernel_send_syslog_msg_from',`
gen_require(`
type syslogd_t, devlog_t;
- class lnk_file read;
- class sock_file rw_file_perms;
- class unix_dgram_socket sendto;
- class unix_stream_socket connectto;
')
allow kernel_t $1:lnk_file read;
@@ -1955,7 +1856,6 @@ interface(`kernel_send_syslog_msg_from',`
interface(`kernel_udp_sendfrom',`
gen_require(`
type kernel_t;
- class udp_socket { sendto recvfrom };
')
allow kernel_t $1:udp_socket sendto;