selinux-refpolicy/policy/modules/services/rshd.te
Stephen Smalley 161bda392e access_vectors: Remove unused permissions
Remove unused permission definitions from SELinux.
Many of these were only ever used in pre-mainline
versions of SELinux, prior to Linux 2.6.0.  Some of them
were used in the legacy network or compat_net=1 checks
that were disabled by default in Linux 2.6.18 and
fully removed in Linux 2.6.30.

The corresponding classmap declarations were removed from the
mainline kernel in:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=42a9699a9fa179c0054ea3cf5ad3cc67104a6162

Permissions never used in mainline Linux:
file swapon
filesystem transition
tcp_socket { connectto newconn acceptfrom }
node enforce_dest
unix_stream_socket { newconn acceptfrom }

Legacy network checks, removed in 2.6.30:
socket { recv_msg send_msg }
node { tcp_recv tcp_send udp_recv udp_send rawip_recv rawip_send dccp_recv dccp_send }
netif { tcp_recv tcp_send udp_recv udp_send rawip_recv rawip_send dccp_recv dccp_send }

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2020-01-14 13:41:50 -05:00

79 lines
1.7 KiB
Plaintext

policy_module(rshd, 1.10.0)
########################################
#
# Declarations
#
type rshd_t;
type rshd_exec_t;
auth_login_pgm_domain(rshd_t)
inetd_tcp_service_domain(rshd_t, rshd_exec_t)
type rshd_keytab_t;
files_type(rshd_keytab_t)
########################################
#
# Local policy
#
allow rshd_t self:capability { chown dac_override fowner fsetid kill setgid setuid };
allow rshd_t self:process { signal_perms setsched setpgid setexec };
allow rshd_t self:fifo_file rw_fifo_file_perms;
allow rshd_t self:tcp_socket create_stream_socket_perms;
allow rshd_t rshd_keytab_t:file read_file_perms;
kernel_read_kernel_sysctls(rshd_t)
corecmd_search_bin(rshd_t)
corenet_all_recvfrom_unlabeled(rshd_t)
corenet_all_recvfrom_netlabel(rshd_t)
corenet_tcp_sendrecv_generic_if(rshd_t)
corenet_tcp_sendrecv_generic_node(rshd_t)
corenet_tcp_bind_generic_node(rshd_t)
corenet_sendrecv_all_server_packets(rshd_t)
corenet_tcp_bind_rsh_port(rshd_t)
corenet_tcp_bind_all_rpc_ports(rshd_t)
corenet_tcp_connect_all_ports(rshd_t)
corenet_tcp_connect_all_rpc_ports(rshd_t)
files_list_home(rshd_t)
logging_search_logs(rshd_t)
miscfiles_read_localization(rshd_t)
tunable_policy(`use_nfs_home_dirs',`
fs_read_nfs_files(rshd_t)
fs_read_nfs_symlinks(rshd_t)
')
tunable_policy(`use_samba_home_dirs',`
fs_read_cifs_files(rshd_t)
fs_read_cifs_symlinks(rshd_t)
')
optional_policy(`
kerberos_manage_host_rcache(rshd_t)
kerberos_read_keytab(rshd_t)
kerberos_tmp_filetrans_host_rcache(rshd_t, file, "host_0")
kerberos_use(rshd_t)
')
optional_policy(`
rlogin_read_home_content(rshd_t)
')
optional_policy(`
tcpd_wrapped_domain(rshd_t, rshd_exec_t)
')
optional_policy(`
unconfined_shell_domtrans(rshd_t)
unconfined_signal(rshd_t)
')