2020-06-10 19:02:27 +00:00
|
|
|
policy_module(rpcbind, 1.13.1)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
|
|
|
|
|
|
|
type rpcbind_t;
|
|
|
|
type rpcbind_exec_t;
|
|
|
|
init_daemon_domain(rpcbind_t, rpcbind_exec_t)
|
2019-09-08 20:55:02 +00:00
|
|
|
init_named_socket_activation(rpcbind_t, rpcbind_runtime_t)
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
type rpcbind_initrc_exec_t;
|
|
|
|
init_script_file(rpcbind_initrc_exec_t)
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
type rpcbind_runtime_t alias rpcbind_var_run_t;
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_file(rpcbind_runtime_t)
|
|
|
|
init_daemon_runtime_file(rpcbind_runtime_t, dir, "rpcbind")
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
type rpcbind_var_lib_t;
|
|
|
|
files_type(rpcbind_var_lib_t)
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
allow rpcbind_t self:capability { dac_override setgid setuid sys_tty_config };
|
|
|
|
# net_admin is for SO_SNDBUFFORCE
|
|
|
|
dontaudit rpcbind_t self:capability net_admin;
|
|
|
|
allow rpcbind_t self:fifo_file rw_fifo_file_perms;
|
|
|
|
allow rpcbind_t self:unix_stream_socket { accept listen };
|
|
|
|
allow rpcbind_t self:tcp_socket { accept listen };
|
|
|
|
|
2019-09-08 20:55:02 +00:00
|
|
|
manage_files_pattern(rpcbind_t, rpcbind_runtime_t, rpcbind_runtime_t)
|
|
|
|
manage_sock_files_pattern(rpcbind_t, rpcbind_runtime_t, rpcbind_runtime_t)
|
2020-06-27 21:11:48 +00:00
|
|
|
files_runtime_filetrans(rpcbind_t, rpcbind_runtime_t, { file sock_file })
|
2018-06-23 13:00:56 +00:00
|
|
|
|
|
|
|
manage_dirs_pattern(rpcbind_t, rpcbind_var_lib_t, rpcbind_var_lib_t)
|
|
|
|
manage_files_pattern(rpcbind_t, rpcbind_var_lib_t, rpcbind_var_lib_t)
|
|
|
|
manage_sock_files_pattern(rpcbind_t, rpcbind_var_lib_t, rpcbind_var_lib_t)
|
|
|
|
files_var_lib_filetrans(rpcbind_t, rpcbind_var_lib_t, { file dir sock_file })
|
|
|
|
|
|
|
|
kernel_read_system_state(rpcbind_t)
|
|
|
|
kernel_read_network_state(rpcbind_t)
|
|
|
|
kernel_request_load_module(rpcbind_t)
|
|
|
|
|
|
|
|
corenet_all_recvfrom_netlabel(rpcbind_t)
|
|
|
|
corenet_tcp_sendrecv_generic_if(rpcbind_t)
|
|
|
|
corenet_udp_sendrecv_generic_if(rpcbind_t)
|
|
|
|
corenet_tcp_sendrecv_generic_node(rpcbind_t)
|
|
|
|
corenet_udp_sendrecv_generic_node(rpcbind_t)
|
|
|
|
corenet_tcp_bind_generic_node(rpcbind_t)
|
|
|
|
corenet_udp_bind_generic_node(rpcbind_t)
|
|
|
|
|
|
|
|
corenet_sendrecv_all_server_packets(rpcbind_t)
|
|
|
|
corenet_tcp_bind_portmap_port(rpcbind_t)
|
|
|
|
corenet_udp_bind_portmap_port(rpcbind_t)
|
|
|
|
corenet_udp_bind_all_rpc_ports(rpcbind_t)
|
|
|
|
|
|
|
|
corecmd_exec_shell(rpcbind_t)
|
|
|
|
|
|
|
|
dev_read_cpu_online(rpcbind_t)
|
|
|
|
|
|
|
|
domain_use_interactive_fds(rpcbind_t)
|
|
|
|
|
|
|
|
files_read_etc_runtime_files(rpcbind_t)
|
|
|
|
|
|
|
|
auth_use_nsswitch(rpcbind_t)
|
|
|
|
|
|
|
|
logging_send_syslog_msg(rpcbind_t)
|
|
|
|
|
|
|
|
miscfiles_read_localization(rpcbind_t)
|
|
|
|
|
|
|
|
ifdef(`distro_debian',`
|
|
|
|
term_dontaudit_use_unallocated_ttys(rpcbind_t)
|
|
|
|
')
|