|
Dominick Grift |
12d4d86 |
policy_module(portmap, 1.10.1)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
# Declarations
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
|
|
Dominick Grift |
12d4d86 |
attribute_role portmap_helper_roles;
|
|
Dominick Grift |
12d4d86 |
|
|
|
1ec3d1a |
type portmap_t;
|
|
|
1ec3d1a |
type portmap_exec_t;
|
|
|
1ec3d1a |
init_daemon_domain(portmap_t, portmap_exec_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type portmap_helper_t;
|
|
|
1ec3d1a |
type portmap_helper_exec_t;
|
|
|
1ec3d1a |
init_system_domain(portmap_helper_t, portmap_helper_exec_t)
|
|
Dominick Grift |
12d4d86 |
role portmap_helper_roles types portmap_helper_t;
|
|
Dominick Grift |
12d4d86 |
|
|
Dominick Grift |
12d4d86 |
type portmap_initrc_exec_t;
|
|
Dominick Grift |
12d4d86 |
init_script_file(portmap_initrc_exec_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type portmap_tmp_t;
|
|
|
1ec3d1a |
files_tmp_file(portmap_tmp_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
type portmap_var_run_t;
|
|
|
1ec3d1a |
files_pid_file(portmap_var_run_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
#
|
|
Dominick Grift |
12d4d86 |
# Local policy
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
allow portmap_t self:capability { setuid setgid };
|
|
|
1ec3d1a |
dontaudit portmap_t self:capability sys_tty_config;
|
|
Dominick Grift |
12d4d86 |
allow portmap_t self:unix_stream_socket { accept listen };
|
|
Dominick Grift |
12d4d86 |
allow portmap_t self:tcp_socket { accept listen };
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
manage_dirs_pattern(portmap_t, portmap_tmp_t, portmap_tmp_t)
|
|
|
1ec3d1a |
manage_files_pattern(portmap_t, portmap_tmp_t, portmap_tmp_t)
|
|
|
1ec3d1a |
files_tmp_filetrans(portmap_t, portmap_tmp_t, { file dir })
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
manage_files_pattern(portmap_t, portmap_var_run_t, portmap_var_run_t)
|
|
|
1ec3d1a |
files_pid_filetrans(portmap_t, portmap_var_run_t, file)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
kernel_read_system_state(portmap_t)
|
|
|
1ec3d1a |
kernel_read_kernel_sysctls(portmap_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
corenet_all_recvfrom_netlabel(portmap_t)
|
|
|
1ec3d1a |
corenet_tcp_sendrecv_generic_if(portmap_t)
|
|
|
1ec3d1a |
corenet_udp_sendrecv_generic_if(portmap_t)
|
|
|
1ec3d1a |
corenet_tcp_sendrecv_generic_node(portmap_t)
|
|
|
1ec3d1a |
corenet_udp_sendrecv_generic_node(portmap_t)
|
|
|
1ec3d1a |
corenet_tcp_sendrecv_all_ports(portmap_t)
|
|
|
1ec3d1a |
corenet_udp_sendrecv_all_ports(portmap_t)
|
|
|
1ec3d1a |
corenet_tcp_bind_generic_node(portmap_t)
|
|
|
1ec3d1a |
corenet_udp_bind_generic_node(portmap_t)
|
|
Dominick Grift |
12d4d86 |
|
|
Dominick Grift |
12d4d86 |
corenet_sendrecv_all_client_packets(portmap_t)
|
|
Dominick Grift |
12d4d86 |
corenet_sendrecv_all_server_packets(portmap_t)
|
|
Dominick Grift |
12d4d86 |
|
|
|
1ec3d1a |
corenet_tcp_bind_portmap_port(portmap_t)
|
|
|
1ec3d1a |
corenet_udp_bind_portmap_port(portmap_t)
|
|
Dominick Grift |
12d4d86 |
|
|
|
1ec3d1a |
corenet_tcp_connect_all_ports(portmap_t)
|
|
Dominick Grift |
12d4d86 |
|
|
|
1ec3d1a |
corenet_tcp_bind_generic_port(portmap_t)
|
|
|
1ec3d1a |
corenet_udp_bind_generic_port(portmap_t)
|
|
Dominick Grift |
12d4d86 |
|
|
|
1ec3d1a |
corenet_tcp_bind_reserved_port(portmap_t)
|
|
|
1ec3d1a |
corenet_udp_bind_reserved_port(portmap_t)
|
|
Dominick Grift |
12d4d86 |
|
|
|
1ec3d1a |
corenet_dontaudit_tcp_bind_all_reserved_ports(portmap_t)
|
|
|
1ec3d1a |
corenet_dontaudit_udp_bind_all_ports(portmap_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
dev_read_sysfs(portmap_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
fs_getattr_all_fs(portmap_t)
|
|
|
1ec3d1a |
fs_search_auto_mountpoints(portmap_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
domain_use_interactive_fds(portmap_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
auth_use_nsswitch(portmap_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
logging_send_syslog_msg(portmap_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
sysnet_read_config(portmap_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
userdom_dontaudit_use_unpriv_user_fds(portmap_t)
|
|
|
1ec3d1a |
userdom_dontaudit_search_user_home_dirs(portmap_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
seutil_sigchld_newrole(portmap_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
optional_policy(`
|
|
|
1ec3d1a |
udev_read_db(portmap_t)
|
|
|
1ec3d1a |
')
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
########################################
|
|
|
1ec3d1a |
#
|
|
Dominick Grift |
12d4d86 |
# Helper local policy
|
|
|
1ec3d1a |
#
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
dontaudit portmap_helper_t self:capability net_admin;
|
|
Dominick Grift |
12d4d86 |
allow portmap_helper_t self:tcp_socket { accept listen };
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
allow portmap_helper_t portmap_var_run_t:file manage_file_perms;
|
|
|
1ec3d1a |
files_pid_filetrans(portmap_helper_t, portmap_var_run_t, file)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
corenet_all_recvfrom_netlabel(portmap_helper_t)
|
|
|
1ec3d1a |
corenet_tcp_sendrecv_generic_if(portmap_helper_t)
|
|
|
1ec3d1a |
corenet_udp_sendrecv_generic_if(portmap_helper_t)
|
|
|
1ec3d1a |
corenet_tcp_sendrecv_generic_node(portmap_helper_t)
|
|
|
1ec3d1a |
corenet_udp_sendrecv_generic_node(portmap_helper_t)
|
|
|
1ec3d1a |
corenet_tcp_sendrecv_all_ports(portmap_helper_t)
|
|
|
1ec3d1a |
corenet_udp_sendrecv_all_ports(portmap_helper_t)
|
|
|
1ec3d1a |
corenet_tcp_bind_generic_node(portmap_helper_t)
|
|
|
1ec3d1a |
corenet_udp_bind_generic_node(portmap_helper_t)
|
|
Dominick Grift |
12d4d86 |
|
|
Dominick Grift |
12d4d86 |
corenet_sendrecv_all_client_packets(portmap_helper_t)
|
|
Dominick Grift |
12d4d86 |
corenet_sendrecv_all_server_packets(portmap_helper_t)
|
|
Dominick Grift |
12d4d86 |
|
|
|
1ec3d1a |
corenet_tcp_bind_reserved_port(portmap_helper_t)
|
|
|
1ec3d1a |
corenet_udp_bind_reserved_port(portmap_helper_t)
|
|
Dominick Grift |
12d4d86 |
|
|
Dominick Grift |
12d4d86 |
corenet_tcp_connect_all_ports(portmap_helper_t)
|
|
Dominick Grift |
12d4d86 |
|
|
|
1ec3d1a |
corenet_dontaudit_tcp_bind_all_reserved_ports(portmap_helper_t)
|
|
|
1ec3d1a |
corenet_dontaudit_udp_bind_all_reserved_ports(portmap_helper_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
domain_dontaudit_use_interactive_fds(portmap_helper_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
files_rw_generic_pids(portmap_helper_t)
|
|
|
1ec3d1a |
|
|
Dominick Grift |
12d4d86 |
auth_use_nsswitch(portmap_helper_t)
|
|
Dominick Grift |
12d4d86 |
|
|
|
1ec3d1a |
init_rw_utmp(portmap_helper_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
logging_send_syslog_msg(portmap_helper_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
sysnet_read_config(portmap_helper_t)
|
|
|
1ec3d1a |
|
|
|
1ec3d1a |
userdom_use_inherited_user_terminals(portmap_helper_t)
|
|
|
1ec3d1a |
userdom_dontaudit_use_all_users_fds(portmap_helper_t)
|