2005-04-20 19:07:16 +00:00
|
|
|
# Copyright (C) 2005 Tresys Technology, LLC
|
2005-05-20 20:07:42 +00:00
|
|
|
## <module name="corenetwork" layer="kernel">
|
|
|
|
## <summary>Policy controlling access to network objects</summary>
|
2005-04-20 19:07:16 +00:00
|
|
|
|
2005-05-24 17:34:29 +00:00
|
|
|
ifdef(`interface_pass',`',`
|
2005-04-14 20:18:17 +00:00
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_tcp_on_general_interface(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_network_tcp_on_general_interface',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 netif_t:netif { tcp_send tcp_recv };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_network_tcp_on_general_interface_depend',`
|
2005-04-14 20:18:17 +00:00
|
|
|
type netif_t;
|
2005-04-21 21:53:15 +00:00
|
|
|
class netif { tcp_send tcp_recv };
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_udp_on_general_interface(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_udp_on_general_interface',`
|
2005-05-04 13:19:47 +00:00
|
|
|
corenetwork_send_udp_on_general_interface($1)
|
|
|
|
corenetwork_receive_udp_on_general_interface($1)
|
2005-04-21 21:53:15 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_raw_on_general_interface(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_raw_on_general_interface',`
|
2005-05-04 13:19:47 +00:00
|
|
|
corenetwork_send_raw_on_general_interface($1)
|
|
|
|
corenetwork_receive_raw_on_general_interface($1)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_send_udp_on_general_interface(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_send_udp_on_general_interface',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 netif_t:netif udp_send;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_send_udp_on_general_interface_depend',`
|
|
|
|
type netif_t;
|
|
|
|
class netif udp_send;
|
|
|
|
')
|
|
|
|
|
2005-04-21 21:53:15 +00:00
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_receive_udp_on_general_interface(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_receive_udp_on_general_interface',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 netif_t:netif udp_recv;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_receive_udp_on_general_interface_depend',`
|
|
|
|
type netif_t;
|
|
|
|
class netif udp_recv;
|
|
|
|
')
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_send_raw_on_general_interface(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_send_raw_on_general_interface',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 netif_t:netif rawip_send;
|
|
|
|
allow $1 self:capability net_raw;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_send_raw_on_general_interface_depend',`
|
|
|
|
type netif_t;
|
|
|
|
class netif rawip_send;
|
|
|
|
class capability net_raw;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_receive_raw_on_general_interface(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_receive_raw_on_general_interface',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 netif_t:netif rawip_recv;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_receive_raw_on_general_interface_depend',`
|
2005-04-14 20:18:17 +00:00
|
|
|
type netif_t;
|
2005-04-21 21:53:15 +00:00
|
|
|
class netif rawip_recv;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_tcp_on_all_interfaces(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_network_tcp_on_all_interfaces',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 netif_type:netif { tcp_send tcp_recv };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_network_tcp_on_all_interfaces_depend',`
|
|
|
|
attribute netif_type;
|
|
|
|
class netif { tcp_send tcp_recv };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_udp_on_all_interfaces(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_network_udp_on_all_interfaces',`
|
2005-05-04 13:19:47 +00:00
|
|
|
corenetwork_send_udp_on_all_interfaces($1)
|
|
|
|
corenetwork_receive_udp_on_all_interfaces($1)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_raw_on_all_interfaces(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_network_raw_on_all_interfaces',`
|
2005-05-04 13:19:47 +00:00
|
|
|
corenetwork_send_raw_on_all_interfaces($1)
|
|
|
|
corenetwork_receive_raw_on_all_interfaces($1)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_send_udp_on_all_interfaces(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_send_udp_on_all_interfaces',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 netif_type:netif udp_send;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_send_udp_on_all_interfaces_depend',`
|
|
|
|
attribute netif_type;
|
|
|
|
class netif udp_send;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_send_raw_on_all_interfaces(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_send_raw_on_all_interfaces',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 netif_type:netif rawip_send;
|
|
|
|
allow $1 self:capability net_raw;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_send_raw_on_all_interfaces_depend',`
|
|
|
|
attribute netif_type;
|
|
|
|
class netif rawip_send;
|
|
|
|
class capability net_raw;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_receive_udp_on_all_interfaces(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_receive_udp_on_all_interfaces',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 netif_type:netif udp_recv;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_receive_udp_on_all_interfaces_depend',`
|
|
|
|
attribute netif_type;
|
|
|
|
class netif udp_recv;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_receive_raw_on_all_interfaces(domain)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_receive_raw_on_all_interfaces',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow $1 netif_type:netif rawip_recv;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_receive_raw_on_all_interfaces_depend',`
|
|
|
|
attribute netif_type;
|
|
|
|
class netif rawip_recv;
|
|
|
|
')
|
|
|
|
|
2005-04-21 21:53:15 +00:00
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_tcp_on_general_node(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_tcp_on_general_node',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 node_t:node { tcp_send tcp_recv };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_network_tcp_on_general_node_depend',`
|
|
|
|
type node_t;
|
|
|
|
class node { tcp_send tcp_recv };
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_udp_on_general_node(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_udp_on_general_node',`
|
|
|
|
corenetwork_send_udp_on_general_node($1,$2)
|
|
|
|
corenetwork_receive_udp_on_general_node($1,$2)
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_raw_on_general_node(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_raw_on_general_node',`
|
|
|
|
corenetwork_send_raw_on_general_node($1,$2)
|
|
|
|
corenetwork_receive_raw_on_general_node($1,$2)
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_send_udp_on_general_node(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_send_udp_on_general_node',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 node_t:node udp_send;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_send_udp_on_general_node_depend',`
|
|
|
|
type node_t;
|
|
|
|
class node udp_send;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_receive_udp_on_general_node(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_receive_udp_on_general_node',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 node_t:node udp_recv;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_receive_udp_on_general_node_depend',`
|
|
|
|
type node_t;
|
|
|
|
class node udp_recv;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_send_raw_on_general_node(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_send_raw_on_general_node',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 node_t:node rawip_send;
|
|
|
|
allow $1 self:capability net_raw;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_send_raw_on_general_node_depend',`
|
|
|
|
type node_t;
|
|
|
|
class node rawip_send;
|
|
|
|
class capability net_raw;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_receive_raw_on_general_node(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_receive_raw_on_general_node',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 node_t:node rawip_recv;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_receive_raw_on_general_node_depend',`
|
|
|
|
type node_t;
|
|
|
|
class node rawip_recv;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_bind_tcp_on_general_node(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_bind_tcp_on_general_node',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 node_t:tcp_socket node_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_bind_udp_on_general_node_depend',`
|
|
|
|
type node_t;
|
|
|
|
class tcp_socket node_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_bind_udp_on_general_node(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_bind_udp_on_general_node',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 node_t:udp_socket node_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_bind_udp_on_general_node_depend',`
|
|
|
|
type node_t;
|
|
|
|
class udp_socket node_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_tcp_on_all_nodes(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_tcp_on_all_nodes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 node_type:node { tcp_send tcp_recv };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_network_tcp_on_all_nodes_depend',`
|
|
|
|
attribute node_type;
|
|
|
|
class node { tcp_send tcp_recv };
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_udp_on_all_nodes(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_udp_on_all_nodes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
corenetwork_send_udp_on_all_nodes($1)
|
|
|
|
corenetwork_receive_udp_on_all_nodes($1)
|
2005-04-21 21:53:15 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_raw_on_all_nodes(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_raw_on_all_nodes',`
|
|
|
|
corenetwork_send_raw_on_all_nodes($1,optional)
|
|
|
|
corenetwork_receive_raw_on_all_nodes($1,optional)
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_send_udp_on_all_nodes(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_send_udp_on_all_nodes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 node_type:node udp_send;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_send_udp_on_all_nodes_depend',`
|
|
|
|
attribute node_type;
|
|
|
|
class node udp_send;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_receive_udp_on_all_nodes(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_receive_udp_on_all_nodes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 node_type:node udp_recv;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_receive_udp_on_all_nodes_depend',`
|
|
|
|
attribute node_type;
|
|
|
|
class node udp_recv;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_send_raw_on_all_nodes(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_send_raw_on_all_nodes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 node_type:node rawip_send;
|
|
|
|
allow $1 self:capability net_raw;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_send_raw_on_all_nodes_depend',`
|
|
|
|
attribute node_type;
|
|
|
|
class node rawip_send;
|
|
|
|
class capability net_raw;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_receive_raw_on_all_nodes(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_receive_raw_on_all_nodes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 node_type:node rawip_recv;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_receive_raw_on_all_nodes_depend',`
|
|
|
|
attribute node_type;
|
|
|
|
class node rawip_recv;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_bind_tcp_on_all_nodes(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_bind_tcp_on_all_nodes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 node_type:tcp_socket node_bind;
|
|
|
|
')
|
|
|
|
|
2005-05-04 13:19:47 +00:00
|
|
|
define(`corenetwork_bind_tcp_on_all_nodes_depend',`
|
2005-04-25 19:54:27 +00:00
|
|
|
attribute node_type;
|
2005-04-21 21:53:15 +00:00
|
|
|
class tcp_socket node_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_bind_udp_on_all_nodes(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_bind_udp_on_all_nodes',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 node_type:udp_socket node_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_bind_udp_on_all_nodes_depend',`
|
2005-04-25 19:54:27 +00:00
|
|
|
attribute node_type;
|
2005-04-21 21:53:15 +00:00
|
|
|
class udp_socket node_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_tcp_on_general_port(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_tcp_on_general_port',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 port_t:tcp_socket { send_msg recv_msg };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_network_tcp_on_general_port_depend',`
|
|
|
|
type port_t;
|
|
|
|
class tcp_socket { send_msg recv_msg };
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_udp_on_general_port(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_udp_on_general_port',`
|
2005-05-04 13:19:47 +00:00
|
|
|
corenetwork_send_udp_on_general_port($1)
|
|
|
|
corenetwork_receive_udp_on_general_port($1)
|
2005-04-21 21:53:15 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_send_udp_on_general_port(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_send_udp_on_general_port',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 port_t:udp_socket send_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_send_udp_on_general_port_depend',`
|
|
|
|
type port_t;
|
|
|
|
class udp_socket send_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_receive_udp_on_general_port(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_receive_udp_on_general_port',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 port_t:udp_socket recv_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_receive_udp_on_general_port_depend',`
|
|
|
|
type port_t;
|
|
|
|
class udp_socket recv_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_bind_tcp_on_general_port(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_bind_tcp_on_general_port',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 port_t:tcp_socket name_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_bind_udp_on_general_port_depend',`
|
|
|
|
type port_t;
|
|
|
|
class tcp_socket name_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_bind_udp_on_general_port(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_bind_udp_on_general_port',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 port_t:udp_socket name_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_bind_udp_on_general_port_depend',`
|
|
|
|
type port_t;
|
|
|
|
class udp_socket name_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_tcp_on_all_ports(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_tcp_on_all_ports',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 port_type:tcp_socket { send_msg recv_msg };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_network_tcp_on_all_ports_depend',`
|
|
|
|
attribute port_type;
|
|
|
|
class tcp_socket { send_msg recv_msg };
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_udp_on_all_ports(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_udp_on_all_ports',`
|
2005-05-04 13:19:47 +00:00
|
|
|
corenetwork_send_udp_on_all_ports($1)
|
|
|
|
corenetwork_receive_udp_on_all_ports($1)
|
2005-04-21 21:53:15 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_send_udp_on_all_ports(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_send_udp_on_all_ports',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 port_type:udp_socket send_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_send_udp_on_all_ports_depend',`
|
|
|
|
attribute port_type;
|
|
|
|
class udp_socket send_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_receive_udp_on_all_ports(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_receive_udp_on_all_ports',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 port_type:udp_socket recv_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_receive_udp_on_all_ports_depend',`
|
|
|
|
attribute port_type;
|
|
|
|
class udp_socket recv_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
|
|
|
# corenetwork_bind_tcp_on_all_ports(domain,[`optional'])
|
|
|
|
#
|
|
|
|
define(`corenetwork_bind_tcp_on_all_ports',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 port_type:tcp_socket name_bind;
|
|
|
|
')
|
|
|
|
|
2005-05-04 13:19:47 +00:00
|
|
|
define(`corenetwork_bind_tcp_on_all_ports_depend',`
|
2005-05-05 14:02:32 +00:00
|
|
|
attribute port_type;
|
2005-04-21 21:53:15 +00:00
|
|
|
class tcp_socket name_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_bind_udp_on_all_ports(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_bind_udp_on_all_ports',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 port_type:udp_socket name_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_bind_udp_on_all_ports_depend',`
|
2005-05-05 14:02:32 +00:00
|
|
|
attribute port_type;
|
2005-04-21 21:53:15 +00:00
|
|
|
class udp_socket name_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_tcp_on_reserved_port(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_tcp_on_reserved_port',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 reserved_port_t:tcp_socket { send_msg recv_msg };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_network_tcp_on_reserved_port_depend',`
|
|
|
|
type reserved_port_t;
|
|
|
|
class tcp_socket { send_msg recv_msg };
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_udp_on_reserved_port(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_udp_on_reserved_port',`
|
|
|
|
corenetwork_send_udp_on_reserved_port($1,$2)
|
|
|
|
corenetwork_receive_udp_on_reserved_port($1,$2)
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_send_udp_on_reserved_port(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_send_udp_on_reserved_port',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 reserved_port_t:udp_socket send_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_send_udp_on_reserved_port_depend',`
|
|
|
|
type reserved_port_t;
|
|
|
|
class udp_socket send_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_receive_udp_on_reserved_port(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_receive_udp_on_reserved_port',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 reserved_port_t:udp_socket recv_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_receive_udp_on_reserved_port_depend',`
|
|
|
|
type reserved_port_t;
|
|
|
|
class udp_socket recv_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_bind_tcp_on_reserved_port(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_bind_tcp_on_reserved_port',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 reserved_port_t:tcp_socket name_bind;
|
|
|
|
allow $1 self:capability net_bind_service;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_bind_udp_on_reserved_port_depend',`
|
|
|
|
type reserved_port_t;
|
|
|
|
class tcp_socket name_bind;
|
|
|
|
class capability net_bind_service;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_bind_udp_on_reserved_port(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_bind_udp_on_reserved_port',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 reserved_port_t:udp_socket name_bind;
|
|
|
|
allow $1 self:capability net_bind_service;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_bind_udp_on_reserved_port_depend',`
|
|
|
|
type reserved_port_t;
|
|
|
|
class udp_socket name_bind;
|
|
|
|
class capability net_bind_service;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_tcp_on_all_reserved_ports(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_tcp_on_all_reserved_ports',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 reserved_port_type:tcp_socket { send_msg recv_msg };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_network_tcp_on_all_reserved_ports_depend',`
|
|
|
|
attribute reserved_port_type;
|
|
|
|
class tcp_socket { send_msg recv_msg };
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_network_udp_on_all_reserved_ports(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_udp_on_all_reserved_ports',`
|
|
|
|
corenetwork_send_udp_on_all_reserved_ports($1,optional)
|
|
|
|
corenetwork_receive_udp_on_all_reserved_ports($1,optional)
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_send_udp_on_all_reserved_ports(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_send_udp_on_all_reserved_ports',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 reserved_port_type:udp_socket send_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_send_udp_on_all_reserved_ports_depend',`
|
|
|
|
attribute reserved_port_type;
|
|
|
|
class udp_socket send_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_receive_udp_on_all_reserved_ports(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_receive_udp_on_all_reserved_ports',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 reserved_port_type:udp_socket recv_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_receive_udp_on_all_reserved_ports_depend',`
|
|
|
|
attribute reserved_port_type;
|
|
|
|
class udp_socket recv_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_bind_tcp_on_all_reserved_ports(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_bind_tcp_on_all_reserved_ports',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 reserved_port_type:tcp_socket name_bind;
|
|
|
|
allow $1 self:capability net_bind_service;
|
|
|
|
')
|
|
|
|
|
2005-05-04 13:19:47 +00:00
|
|
|
define(`corenetwork_bind_tcp_on_all_reserved_ports_depend',`
|
2005-04-28 21:41:09 +00:00
|
|
|
attribute reserved_port_type;
|
2005-04-21 21:53:15 +00:00
|
|
|
class tcp_socket name_bind;
|
|
|
|
class capability net_bind_service;
|
|
|
|
')
|
|
|
|
|
2005-05-16 21:10:33 +00:00
|
|
|
#######################################
|
|
|
|
#
|
|
|
|
# corenetwork_ignore_bind_tcp_on_all_reserved_ports(domain)
|
|
|
|
#
|
|
|
|
define(`corenetwork_ignore_bind_tcp_on_all_reserved_ports',`
|
|
|
|
requires_block_template(`$0'_depend)
|
|
|
|
dontaudit $1 reserved_port_type:tcp_socket name_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_ignore_bind_tcp_on_all_reserved_ports_depend',`
|
|
|
|
attribute reserved_port_type;
|
|
|
|
class tcp_socket name_bind;
|
|
|
|
')
|
|
|
|
|
2005-04-21 21:53:15 +00:00
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_bind_udp_on_all_reserved_ports(domain)
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_bind_udp_on_all_reserved_ports',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow $1 reserved_port_type:udp_socket name_bind;
|
|
|
|
allow $1 self:capability net_bind_service;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_bind_udp_on_all_reserved_ports_depend',`
|
2005-04-28 21:41:09 +00:00
|
|
|
attribute reserved_port_type;
|
2005-04-21 21:53:15 +00:00
|
|
|
class udp_socket name_bind;
|
|
|
|
class self:capability net_bind_service;
|
|
|
|
')
|
|
|
|
|
2005-04-28 21:41:09 +00:00
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_ignore_bind_tcp_on_all_reserved_ports(domain)
|
2005-04-28 21:41:09 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_ignore_bind_tcp_on_all_reserved_ports',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-28 21:41:09 +00:00
|
|
|
dontaudit $1 reserved_port_type:tcp_socket name_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_ignore_bind_udp_on_all_reserved_ports_depend',`
|
|
|
|
attribute reserved_port_type;
|
|
|
|
class tcp_socket name_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
#
|
2005-05-04 13:19:47 +00:00
|
|
|
# corenetwork_ignore_bind_udp_on_all_reserved_ports(domain)
|
2005-04-28 21:41:09 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_ignore_bind_udp_on_all_reserved_ports',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`$0'_depend)
|
2005-04-28 21:41:09 +00:00
|
|
|
dontaudit $1 reserved_port_type:udp_socket name_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_ignore_bind_udp_on_all_reserved_ports_depend',`
|
|
|
|
attribute reserved_port_type;
|
|
|
|
class udp_socket name_bind;
|
|
|
|
')
|
|
|
|
|
2005-05-24 17:34:29 +00:00
|
|
|
') dnl end if not interface_pass
|
2005-04-14 20:18:17 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# This section is processed through m4 to create real interfaces
|
|
|
|
#
|
|
|
|
########################################
|
|
|
|
|
2005-04-21 21:53:15 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Network Interface generated macros
|
|
|
|
#
|
|
|
|
########################################
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
define(`create_netif_interfaces',``
|
2005-05-20 20:07:42 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_network_tcp_on_$1_interface">
|
|
|
|
## <description>
|
|
|
|
## Send and receive TCP network traffic on the $1 interface.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="both" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_network_tcp_on_$1_interface',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`dollarszero'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow dollarsone $1_netif_t:netif { tcp_send tcp_recv };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_network_tcp_on_$1_interface_depend',`
|
2005-04-14 20:18:17 +00:00
|
|
|
type $1_netif_t;
|
2005-04-21 21:53:15 +00:00
|
|
|
class netif { tcp_send tcp_recv };
|
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_network_udp_on_$1_interface">
|
|
|
|
## <description>
|
|
|
|
## Send and receive UDP network traffic on the $1 interface.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="both" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_udp_on_$1_interface',`
|
|
|
|
corenetwork_send_udp_on_$1_interface(dollarsone,dollarstwo)
|
|
|
|
corenetwork_receive_udp_on_$1_interface(dollarsone,dollarstwo)
|
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_network_raw_on_$1_interface">
|
|
|
|
## <description>
|
|
|
|
## Send and receive raw IP packets on the $1 interface.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="both" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_raw_on_$1_interface',`
|
|
|
|
corenetwork_send_raw_on_$1_interface(dollarsone,dollarstwo)
|
|
|
|
corenetwork_receive_raw_on_$1_interface(dollarsone,dollarstwo)
|
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_send_udp_on_$1_interface">
|
|
|
|
## <description>
|
|
|
|
## Send UDP network traffic on the $1 interface.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_send_udp_on_$1_interface',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`dollarszero'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow dollarsone $1_netif_t:netif udp_send;
|
|
|
|
')
|
|
|
|
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_send_udp_on_$1_interface_depend',`
|
2005-04-14 20:18:17 +00:00
|
|
|
type $1_netif_t;
|
|
|
|
class netif udp_send;
|
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_receive_udp_on_$1_interface">
|
|
|
|
## <description>
|
|
|
|
## Receive UDP network traffic on the $1 interface.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="read" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_receive_udp_on_$1_interface',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`dollarszero'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow dollarsone $1_netif_t:netif udp_recv;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_receive_udp_on_$1_interface_depend',`
|
|
|
|
type $1_netif_t;
|
|
|
|
class netif udp_recv;
|
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_send_raw_on_$1_interface">
|
|
|
|
## <description>
|
|
|
|
## Send raw IP packets on the $1 interface.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_send_raw_on_$1_interface',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`dollarszero'_depend)
|
2005-04-14 20:18:17 +00:00
|
|
|
allow dollarsone $1_netif_t:netif rawip_send;
|
|
|
|
allow dollarsone self:capability net_raw;
|
|
|
|
')
|
|
|
|
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_send_raw_on_$1_interface_depend',`
|
2005-04-14 20:18:17 +00:00
|
|
|
type $1_netif_t;
|
|
|
|
class netif rawip_send;
|
|
|
|
class capability net_raw;
|
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_receive_raw_on_$1_interface">
|
|
|
|
## <description>
|
|
|
|
## Receive raw IP packets on the $1 interface.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="read" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_receive_raw_on_$1_interface',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`dollarszero'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow dollarsone $1_netif_t:netif rawip_recv;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_receive_raw_on_$1_interface_depend',`
|
2005-04-14 20:18:17 +00:00
|
|
|
type $1_netif_t;
|
2005-04-21 21:53:15 +00:00
|
|
|
class netif rawip_recv;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
2005-04-21 21:53:15 +00:00
|
|
|
'') dnl end create_netif_interfaces
|
2005-04-14 20:18:17 +00:00
|
|
|
|
2005-04-21 21:53:15 +00:00
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Network node generated macros
|
|
|
|
#
|
|
|
|
########################################
|
|
|
|
|
|
|
|
define(`create_node_interfaces',``
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_network_tcp_on_$1_node">
|
|
|
|
## <description>
|
|
|
|
## Send and receive TCP traffic on the $1 node.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="both" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_network_tcp_on_$1_node',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`dollarszero'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow dollarsone $1_node_t:node { tcp_send tcp_recv };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_network_tcp_on_$1_node_depend',`
|
|
|
|
type $1_node_t;
|
|
|
|
class node { tcp_send tcp_recv };
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_network_udp_on_$1_node">
|
|
|
|
## <description>
|
|
|
|
## Send and receive UDP traffic on the $1 node.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="both" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`corenetwork_network_udp_on_$1_node',`
|
2005-05-04 13:19:47 +00:00
|
|
|
corenetwork_send_udp_on_$1_node(dollarsone)
|
|
|
|
corenetwork_receive_udp_on_$1_node(dollarsone)
|
2005-04-21 21:53:15 +00:00
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_network_raw_on_$1_node">
|
|
|
|
## <description>
|
|
|
|
## Send and receive raw IP packets on the $1 node.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="both" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_raw_on_$1_node',`
|
2005-05-04 13:19:47 +00:00
|
|
|
corenetwork_send_raw_on_$1_node(dollarsone)
|
|
|
|
corenetwork_receive_raw_on_$1_node(dollarsone)
|
2005-04-21 21:53:15 +00:00
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_send_udp_on_$1_node">
|
|
|
|
## <description>
|
|
|
|
## Send and UDP traffic on the $1 node.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_send_udp_on_$1_node',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`dollarszero'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow dollarsone $1_node_t:node udp_send;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_send_udp_on_$1_node_depend',`
|
|
|
|
type $1_node_t;
|
|
|
|
class node udp_send;
|
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_receive_udp_on_$1_node">
|
|
|
|
## <description>
|
|
|
|
## Receive UDP traffic on the $1 node.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="read" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_receive_udp_on_$1_node',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`dollarszero'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow dollarsone $1_node_t:node udp_recv;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_receive_udp_on_$1_node_depend',`
|
|
|
|
type $1_node_t;
|
|
|
|
class node udp_recv;
|
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_send_raw_on_$1_node">
|
|
|
|
## <description>
|
|
|
|
## Send raw IP packets on the $1 node.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_send_raw_on_$1_node',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`dollarszero'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow dollarsone $1_node_t:node rawip_send;
|
|
|
|
allow dollarsone self:capability net_raw;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_send_raw_on_$1_node_depend',`
|
|
|
|
type $1_node_t;
|
|
|
|
class node rawip_send;
|
|
|
|
class capability net_raw;
|
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_receive_raw_on_$1_node">
|
|
|
|
## <description>
|
|
|
|
## Receive raw IP packets on the $1 node.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_receive_raw_on_$1_node',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`dollarszero'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow dollarsone $1_node_t:node rawip_recv;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_receive_raw_on_$1_node_depend',`
|
|
|
|
type $1_node_t;
|
|
|
|
class node rawip_recv;
|
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_bind_tcp_on_$1_node">
|
|
|
|
## <description>
|
|
|
|
## Bind TCP sockets to node $1.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="none"/>
|
|
|
|
## </interface>
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_bind_tcp_on_$1_node',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`dollarszero'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow dollarsone $1_node_t:tcp_socket node_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_bind_tcp_on_$1_node_depend',`
|
|
|
|
type $1_node_t;
|
|
|
|
class tcp_socket node_bind;
|
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_bind_udp_on_$1_node">
|
|
|
|
## <description>
|
|
|
|
## Bind UDP sockets to the $1 node.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="none"/>
|
|
|
|
## </interface>
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_bind_udp_on_$1_node',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`dollarszero'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow dollarsone $1_node_t:udp_socket node_bind;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_bind_udp_on_$1_node_depend',`
|
|
|
|
type $1_node_t;
|
|
|
|
class udp_socket node_bind;
|
|
|
|
')
|
|
|
|
'') dnl end create_node_interfaces
|
|
|
|
|
|
|
|
########################################
|
|
|
|
#
|
|
|
|
# Network port generated macros
|
|
|
|
#
|
|
|
|
########################################
|
|
|
|
|
|
|
|
define(`create_port_interfaces',``
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_network_tcp_on_$1_port">
|
|
|
|
## <description>
|
|
|
|
## Send and receive TCP traffic on the $1 port.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="both" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_tcp_on_$1_port',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`dollarszero'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow dollarsone $1_port_t:tcp_socket { send_msg recv_msg };
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_network_tcp_on_$1_port_depend',`
|
|
|
|
type $1_port_t;
|
|
|
|
class tcp_socket { send_msg recv_msg };
|
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_network_udp_on_$1_port">
|
|
|
|
## <description>
|
|
|
|
## Send and receive UDP traffic on the $1 port.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="both" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_network_udp_on_$1_port',`
|
|
|
|
corenetwork_send_udp_on_$1_port(dollarsone,dollarstwo)
|
|
|
|
corenetwork_receive_udp_on_$1_port(dollarsone,dollarstwo)
|
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_send_udp_on_$1_port">
|
|
|
|
## <description>
|
|
|
|
## Send UDP traffic on the $1 port.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="write" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_send_udp_on_$1_port',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`dollarszero'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow dollarsone $1_port_t:udp_socket send_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_send_udp_on_$1_port_depend',`
|
|
|
|
type $1_port_t;
|
|
|
|
class udp_socket send_msg;
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
2005-04-21 21:53:15 +00:00
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_receive_udp_on_$1_port">
|
|
|
|
## <description>
|
|
|
|
## Receive UDP traffic on the $1 port.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="read" weight="10"/>
|
|
|
|
## </interface>
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_receive_udp_on_$1_port',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`dollarszero'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow dollarsone $1_port_t:udp recv_msg;
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_receive_udp_on_$1_port_depend',`
|
|
|
|
type $1_port_t;
|
|
|
|
class udp_socket recv_msg;
|
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_bind_tcp_on_$1_port">
|
|
|
|
## <description>
|
|
|
|
## Bind TCP sockets to the $1 port.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="none"/>
|
|
|
|
## </interface>
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_bind_tcp_on_$1_port',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`dollarszero'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow dollarsone $1_port_t:tcp_socket name_bind;
|
|
|
|
$2
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_bind_tcp_on_$1_port_depend',`
|
|
|
|
type $1_port_t;
|
|
|
|
class tcp_socket name_bind;
|
|
|
|
$3
|
|
|
|
')
|
|
|
|
|
2005-05-20 20:07:42 +00:00
|
|
|
########################################
|
|
|
|
## <interface name="corenetwork_bind_udp_on_$1_port">
|
|
|
|
## <description>
|
|
|
|
## Bind UDP sockets to the $1 port.
|
|
|
|
## </description>
|
|
|
|
## <parameter name="domain">
|
|
|
|
## The type of the process performing this action.
|
|
|
|
## </parameter>
|
|
|
|
## <infoflow type="none"/>
|
|
|
|
## </interface>
|
2005-04-21 21:53:15 +00:00
|
|
|
#
|
|
|
|
define(`corenetwork_bind_udp_on_$1_port',`
|
2005-05-04 13:19:47 +00:00
|
|
|
requires_block_template(`dollarszero'_depend)
|
2005-04-21 21:53:15 +00:00
|
|
|
allow dollarsone $1_port_t:udp_socket name_bind;
|
|
|
|
$2
|
|
|
|
')
|
|
|
|
|
|
|
|
define(`corenetwork_bind_udp_on_$1_port_depend',`
|
|
|
|
type $1_port_t;
|
|
|
|
class udp_socket name_bind;
|
|
|
|
$3
|
|
|
|
')
|
|
|
|
'') dnl end create_port_interfaces
|
2005-04-14 20:18:17 +00:00
|
|
|
|
|
|
|
#
|
2005-05-20 20:07:42 +00:00
|
|
|
# network_interface(linux_interfacename,mls_sensitivity)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`network_interface',`
|
|
|
|
ifdef(`interface_pass',`
|
|
|
|
create_netif_interfaces($1)
|
|
|
|
',`
|
|
|
|
type $1_netif_t alias netif_$1_t, netif_type;
|
|
|
|
requires_block_template(`type unlabeled_t')
|
2005-05-20 20:07:42 +00:00
|
|
|
netifcon $1 context_template(system_u:object_r:$1_netif_t,$2) context_template(system_u:object_r:unlabeled_t,$2)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
')
|
|
|
|
|
|
|
|
#
|
2005-05-20 20:07:42 +00:00
|
|
|
# network_node(node_name,mls_sensitivity,address,netmask)
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`network_node',`
|
|
|
|
ifdef(`interface_pass',`
|
2005-04-21 21:53:15 +00:00
|
|
|
create_node_interfaces($1)
|
2005-04-14 20:18:17 +00:00
|
|
|
',`
|
|
|
|
type $1_node_t alias node_$1_t, node_type;
|
2005-05-20 20:07:42 +00:00
|
|
|
nodecon $3 $4 context_template(system_u:object_r:$1_node_t,$2)
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
')
|
|
|
|
|
2005-04-21 21:53:15 +00:00
|
|
|
define(`determine_reserved_capability',`dnl
|
|
|
|
ifelse(eval($2 < 1024),1,``allow' dollarsone self:capability net_bind_service;',`dnl
|
2005-05-20 20:23:25 +00:00
|
|
|
ifelse($4,`',`',`determine_reserved_capability(shiftn(3,$*))')dnl end inner ifelse
|
2005-04-21 21:53:15 +00:00
|
|
|
')dnl end outer ifelse
|
|
|
|
') dnl end determine reserved capability
|
|
|
|
|
|
|
|
define(`determine_reserved_capability_depend',`dnl
|
|
|
|
ifelse(eval($2 < 1024),1,`class capability net_bind_service;',`dnl
|
2005-05-20 20:23:25 +00:00
|
|
|
ifelse($4,`',`',`determine_reserved_capability_depend(shiftn(3,$*))')dnl end inner ifelse
|
2005-04-21 21:53:15 +00:00
|
|
|
')dnl end outer ifelse
|
|
|
|
') dnl end determine reserved capability depend
|
|
|
|
|
2005-04-14 20:18:17 +00:00
|
|
|
define(`declare_ports',`dnl
|
|
|
|
ifelse(eval($3 < 1024),1,`typeattribute $1 reserved_port_type;',`dnl')
|
2005-05-20 20:23:25 +00:00
|
|
|
portcon $2 $3 context_template(system_u:object_r:$1,$4)
|
|
|
|
ifelse(`$5',`',`',`declare_ports($1,shiftn(4,$*))')dnl
|
2005-04-14 20:18:17 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#
|
2005-05-20 20:23:25 +00:00
|
|
|
# network_port(port_name,protocol portnum mls_sensitivity [,protocol portnum mls_sensitivity[,...]])
|
2005-04-14 20:18:17 +00:00
|
|
|
#
|
|
|
|
define(`network_port',`
|
|
|
|
ifdef(`interface_pass',`
|
2005-04-21 21:53:15 +00:00
|
|
|
create_port_interfaces($1,determine_reserved_capability(shift($*)),determine_reserved_capability_depend(shift($*)))
|
2005-04-14 20:18:17 +00:00
|
|
|
',`
|
|
|
|
type $1_port_t, port_type;
|
|
|
|
declare_ports($1_port_t,shift($*))
|
|
|
|
')
|
|
|
|
')
|
2005-05-20 20:07:42 +00:00
|
|
|
|
2005-05-24 17:34:29 +00:00
|
|
|
ifdef(`interface_pass',`',`
|
2005-05-20 20:07:42 +00:00
|
|
|
## </module>
|
2005-05-24 17:34:29 +00:00
|
|
|
')
|