selinux-refpolicy/policy/modules/services/certmaster.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

75 lines
2.3 KiB
Plaintext

policy_module(certmaster, 1.5.1)
########################################
#
# Declarations
#
type certmaster_t;
type certmaster_exec_t;
init_daemon_domain(certmaster_t, certmaster_exec_t)
type certmaster_initrc_exec_t;
init_script_file(certmaster_initrc_exec_t)
type certmaster_etc_rw_t;
files_type(certmaster_etc_rw_t)
type certmaster_runtime_t alias certmaster_var_run_t;
files_pid_file(certmaster_runtime_t)
type certmaster_var_lib_t;
files_type(certmaster_var_lib_t)
type certmaster_var_log_t;
logging_log_file(certmaster_var_log_t)
###########################################
#
# Local policy
#
allow certmaster_t self:capability { dac_override dac_read_search sys_tty_config };
allow certmaster_t self:tcp_socket { accept listen };
list_dirs_pattern(certmaster_t, certmaster_etc_rw_t, certmaster_etc_rw_t)
manage_files_pattern(certmaster_t, certmaster_etc_rw_t, certmaster_etc_rw_t)
manage_files_pattern(certmaster_t, certmaster_var_lib_t, certmaster_var_lib_t)
manage_dirs_pattern(certmaster_t, certmaster_var_lib_t, certmaster_var_lib_t)
files_var_lib_filetrans(certmaster_t, certmaster_var_lib_t, { dir file })
append_files_pattern(certmaster_t, certmaster_var_log_t, certmaster_var_log_t)
create_files_pattern(certmaster_t, certmaster_var_log_t, certmaster_var_log_t)
setattr_files_pattern(certmaster_t, certmaster_var_log_t, certmaster_var_log_t)
logging_log_filetrans(certmaster_t, certmaster_var_log_t, file )
manage_files_pattern(certmaster_t, certmaster_runtime_t, certmaster_runtime_t)
manage_sock_files_pattern(certmaster_t, certmaster_runtime_t, certmaster_runtime_t)
files_pid_filetrans(certmaster_t ,certmaster_runtime_t, { file sock_file })
kernel_read_system_state(certmaster_t)
corecmd_exec_bin(certmaster_t)
corenet_all_recvfrom_unlabeled(certmaster_t)
corenet_all_recvfrom_netlabel(certmaster_t)
corenet_tcp_sendrecv_generic_if(certmaster_t)
corenet_tcp_sendrecv_generic_node(certmaster_t)
corenet_tcp_bind_generic_node(certmaster_t)
corenet_sendrecv_certmaster_server_packets(certmaster_t)
corenet_tcp_bind_certmaster_port(certmaster_t)
dev_read_urand(certmaster_t)
files_list_var(certmaster_t)
files_search_etc(certmaster_t)
files_read_usr_files(certmaster_t)
auth_use_nsswitch(certmaster_t)
miscfiles_read_localization(certmaster_t)
miscfiles_manage_generic_cert_dirs(certmaster_t)
miscfiles_manage_generic_cert_files(certmaster_t)