mirror of
https://github.com/SELinuxProject/refpolicy
synced 2025-01-11 09:39:25 +00:00
interface review, and remove net_raw from raw node sends. only give
capability for raw send on an interface
This commit is contained in:
parent
bc1fbab472
commit
2ba9a794db
@ -13,15 +13,12 @@
|
||||
## </interface>
|
||||
#
|
||||
define(`corenet_tcp_sendrecv_generic_if',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 netif_t:netif { tcp_send tcp_recv };
|
||||
gen_require(`
|
||||
type netif_t;
|
||||
class netif { tcp_send tcp_recv };
|
||||
')
|
||||
|
||||
define(`corenet_tcp_sendrecv_generic_if_depend',`
|
||||
type netif_t;
|
||||
|
||||
class netif { tcp_send tcp_recv };
|
||||
allow $1 netif_t:netif { tcp_send tcp_recv };
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -29,15 +26,12 @@ define(`corenet_tcp_sendrecv_generic_if_depend',`
|
||||
# corenet_udp_send_generic_if(domain)
|
||||
#
|
||||
define(`corenet_udp_send_generic_if',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 netif_t:netif udp_send;
|
||||
gen_require(`
|
||||
type netif_t;
|
||||
class netif udp_send;
|
||||
')
|
||||
|
||||
define(`corenet_udp_send_generic_if_depend',`
|
||||
type netif_t;
|
||||
|
||||
class netif udp_send;
|
||||
allow $1 netif_t:netif udp_send;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -45,15 +39,12 @@ define(`corenet_udp_send_generic_if_depend',`
|
||||
# corenet_udp_receive_generic_if(domain)
|
||||
#
|
||||
define(`corenet_udp_receive_generic_if',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 netif_t:netif udp_recv;
|
||||
gen_require(`
|
||||
type netif_t;
|
||||
class netif udp_recv;
|
||||
')
|
||||
|
||||
define(`corenet_udp_receive_generic_if_depend',`
|
||||
type netif_t;
|
||||
|
||||
class netif udp_recv;
|
||||
allow $1 netif_t:netif udp_recv;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -70,33 +61,27 @@ define(`corenet_udp_sendrecv_generic_if',`
|
||||
# corenet_raw_send_generic_if(domain)
|
||||
#
|
||||
define(`corenet_raw_send_generic_if',`
|
||||
gen_require(`$0'_depend)
|
||||
gen_require(`
|
||||
type netif_t;
|
||||
class netif rawip_send;
|
||||
class capability net_raw;
|
||||
')
|
||||
|
||||
allow $1 netif_t:netif rawip_send;
|
||||
allow $1 self:capability net_raw;
|
||||
')
|
||||
|
||||
define(`corenet_raw_send_generic_if_depend',`
|
||||
type netif_t;
|
||||
|
||||
class netif rawip_send;
|
||||
class capability net_raw;
|
||||
')
|
||||
|
||||
#######################################
|
||||
#
|
||||
# corenet_raw_receive_generic_if(domain)
|
||||
#
|
||||
define(`corenet_raw_receive_generic_if',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 netif_t:netif rawip_recv;
|
||||
gen_require(`
|
||||
type netif_t;
|
||||
class netif rawip_recv;
|
||||
')
|
||||
|
||||
define(`corenet_raw_receive_generic_if_depend',`
|
||||
type netif_t;
|
||||
|
||||
class netif rawip_recv;
|
||||
allow $1 netif_t:netif rawip_recv;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -113,15 +98,12 @@ define(`corenet_raw_sendrecv_generic_if',`
|
||||
# corenet_tcp_sendrecv_all_if(domain)
|
||||
#
|
||||
define(`corenet_tcp_sendrecv_all_if',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 netif_type:netif { tcp_send tcp_recv };
|
||||
gen_require(`
|
||||
attribute netif_type;
|
||||
class netif { tcp_send tcp_recv };
|
||||
')
|
||||
|
||||
define(`corenet_tcp_sendrecv_all_if_depend',`
|
||||
attribute netif_type;
|
||||
|
||||
class netif { tcp_send tcp_recv };
|
||||
allow $1 netif_type:netif { tcp_send tcp_recv };
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -129,15 +111,12 @@ define(`corenet_tcp_sendrecv_all_if_depend',`
|
||||
# corenet_udp_send_all_if(domain)
|
||||
#
|
||||
define(`corenet_udp_send_all_if',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 netif_type:netif udp_send;
|
||||
gen_require(`
|
||||
attribute netif_type;
|
||||
class netif udp_send;
|
||||
')
|
||||
|
||||
define(`corenet_udp_send_all_if_depend',`
|
||||
attribute netif_type;
|
||||
|
||||
class netif udp_send;
|
||||
allow $1 netif_type:netif udp_send;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -145,15 +124,12 @@ define(`corenet_udp_send_all_if_depend',`
|
||||
# corenet_udp_receive_all_if(domain)
|
||||
#
|
||||
define(`corenet_udp_receive_all_if',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 netif_type:netif udp_recv;
|
||||
gen_require(`
|
||||
attribute netif_type;
|
||||
class netif udp_recv;
|
||||
')
|
||||
|
||||
define(`corenet_udp_receive_all_if_depend',`
|
||||
attribute netif_type;
|
||||
|
||||
class netif udp_recv;
|
||||
allow $1 netif_type:netif udp_recv;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -170,33 +146,27 @@ define(`corenet_udp_sendrecv_all_if',`
|
||||
# corenet_raw_send_all_if(domain)
|
||||
#
|
||||
define(`corenet_raw_send_all_if',`
|
||||
gen_require(`$0'_depend)
|
||||
gen_require(`
|
||||
attribute netif_type;
|
||||
class netif rawip_send;
|
||||
class capability net_raw;
|
||||
')
|
||||
|
||||
allow $1 netif_type:netif rawip_send;
|
||||
allow $1 self:capability net_raw;
|
||||
')
|
||||
|
||||
define(`corenet_raw_send_all_if_depend',`
|
||||
attribute netif_type;
|
||||
|
||||
class netif rawip_send;
|
||||
class capability net_raw;
|
||||
')
|
||||
|
||||
#######################################
|
||||
#
|
||||
# corenet_raw_receive_all_if(domain)
|
||||
#
|
||||
define(`corenet_raw_receive_all_if',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 netif_type:netif rawip_recv;
|
||||
gen_require(`
|
||||
attribute netif_type;
|
||||
class netif rawip_recv;
|
||||
')
|
||||
|
||||
define(`corenet_raw_receive_all_if_depend',`
|
||||
attribute netif_type;
|
||||
|
||||
class netif rawip_recv;
|
||||
allow $1 netif_type:netif rawip_recv;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -213,15 +183,12 @@ define(`corenet_raw_sendrecv_all_if',`
|
||||
# corenet_tcp_sendrecv_generic_node(domain)
|
||||
#
|
||||
define(`corenet_tcp_sendrecv_generic_node',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 node_t:node { tcp_send tcp_recv };
|
||||
gen_require(`
|
||||
type node_t;
|
||||
class node { tcp_send tcp_recv };
|
||||
')
|
||||
|
||||
define(`corenet_tcp_sendrecv_generic_node_depend',`
|
||||
type node_t;
|
||||
|
||||
class node { tcp_send tcp_recv };
|
||||
allow $1 node_t:node { tcp_send tcp_recv };
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -229,15 +196,12 @@ define(`corenet_tcp_sendrecv_generic_node_depend',`
|
||||
# corenet_udp_send_generic_node(domain)
|
||||
#
|
||||
define(`corenet_udp_send_generic_node',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 node_t:node udp_send;
|
||||
gen_require(`
|
||||
type node_t;
|
||||
class node udp_send;
|
||||
')
|
||||
|
||||
define(`corenet_udp_send_generic_node_depend',`
|
||||
type node_t;
|
||||
|
||||
class node udp_send;
|
||||
allow $1 node_t:node udp_send;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -245,15 +209,12 @@ define(`corenet_udp_send_generic_node_depend',`
|
||||
# corenet_udp_receive_generic_node(domain)
|
||||
#
|
||||
define(`corenet_udp_receive_generic_node',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 node_t:node udp_recv;
|
||||
gen_require(`
|
||||
type node_t;
|
||||
class node udp_recv;
|
||||
')
|
||||
|
||||
define(`corenet_udp_receive_generic_node_depend',`
|
||||
type node_t;
|
||||
|
||||
class node udp_recv;
|
||||
allow $1 node_t:node udp_recv;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -270,17 +231,12 @@ define(`corenet_udp_sendrecv_generic_node',`
|
||||
# corenet_raw_send_generic_node(domain)
|
||||
#
|
||||
define(`corenet_raw_send_generic_node',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 node_t:node rawip_send;
|
||||
allow $1 self:capability net_raw;
|
||||
gen_require(`
|
||||
type node_t;
|
||||
class node rawip_send;
|
||||
')
|
||||
|
||||
define(`corenet_raw_send_generic_node_depend',`
|
||||
type node_t;
|
||||
|
||||
class node rawip_send;
|
||||
class capability net_raw;
|
||||
allow $1 node_t:node rawip_send;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -288,15 +244,12 @@ define(`corenet_raw_send_generic_node_depend',`
|
||||
# corenet_raw_receive_generic_node(domain)
|
||||
#
|
||||
define(`corenet_raw_receive_generic_node',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 node_t:node rawip_recv;
|
||||
gen_require(`
|
||||
type node_t;
|
||||
class node rawip_recv;
|
||||
')
|
||||
|
||||
define(`corenet_raw_receive_generic_node_depend',`
|
||||
type node_t;
|
||||
|
||||
class node rawip_recv;
|
||||
allow $1 node_t:node rawip_recv;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -313,15 +266,12 @@ define(`corenet_raw_sendrecv_generic_node',`
|
||||
# corenet_tcp_bind_generic_node(domain)
|
||||
#
|
||||
define(`corenet_tcp_bind_generic_node',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 node_t:tcp_socket node_bind;
|
||||
gen_require(`
|
||||
type node_t;
|
||||
class tcp_socket node_bind;
|
||||
')
|
||||
|
||||
define(`corenet_tcp_bind_generic_node_depend',`
|
||||
type node_t;
|
||||
|
||||
class tcp_socket node_bind;
|
||||
allow $1 node_t:tcp_socket node_bind;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -329,15 +279,12 @@ define(`corenet_tcp_bind_generic_node_depend',`
|
||||
# corenet_udp_bind_generic_node(domain)
|
||||
#
|
||||
define(`corenet_udp_bind_generic_node',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 node_t:udp_socket node_bind;
|
||||
gen_require(`
|
||||
type node_t;
|
||||
class udp_socket node_bind;
|
||||
')
|
||||
|
||||
define(`corenet_udp_bind_generic_node_depend',`
|
||||
type node_t;
|
||||
|
||||
class udp_socket node_bind;
|
||||
allow $1 node_t:udp_socket node_bind;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -345,15 +292,12 @@ define(`corenet_udp_bind_generic_node_depend',`
|
||||
# corenet_tcp_sendrecv_all_nodes(domain)
|
||||
#
|
||||
define(`corenet_tcp_sendrecv_all_nodes',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 node_type:node { tcp_send tcp_recv };
|
||||
gen_require(`
|
||||
attribute node_type;
|
||||
class node { tcp_send tcp_recv };
|
||||
')
|
||||
|
||||
define(`corenet_tcp_sendrecv_all_nodes_depend',`
|
||||
attribute node_type;
|
||||
|
||||
class node { tcp_send tcp_recv };
|
||||
allow $1 node_type:node { tcp_send tcp_recv };
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -361,15 +305,12 @@ define(`corenet_tcp_sendrecv_all_nodes_depend',`
|
||||
# corenet_udp_send_all_nodes(domain)
|
||||
#
|
||||
define(`corenet_udp_send_all_nodes',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 node_type:node udp_send;
|
||||
gen_require(`
|
||||
attribute node_type;
|
||||
class node udp_send;
|
||||
')
|
||||
|
||||
define(`corenet_udp_send_all_nodes_depend',`
|
||||
attribute node_type;
|
||||
|
||||
class node udp_send;
|
||||
allow $1 node_type:node udp_send;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -377,15 +318,12 @@ define(`corenet_udp_send_all_nodes_depend',`
|
||||
# corenet_udp_receive_all_nodes(domain)
|
||||
#
|
||||
define(`corenet_udp_receive_all_nodes',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 node_type:node udp_recv;
|
||||
gen_require(`
|
||||
attribute node_type;
|
||||
class node udp_recv;
|
||||
')
|
||||
|
||||
define(`corenet_udp_receive_all_nodes_depend',`
|
||||
attribute node_type;
|
||||
|
||||
class node udp_recv;
|
||||
allow $1 node_type:node udp_recv;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -402,17 +340,12 @@ define(`corenet_udp_sendrecv_all_nodes',`
|
||||
# corenet_raw_send_all_nodes(domain)
|
||||
#
|
||||
define(`corenet_raw_send_all_nodes',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 node_type:node rawip_send;
|
||||
allow $1 self:capability net_raw;
|
||||
gen_require(`
|
||||
attribute node_type;
|
||||
class node rawip_send;
|
||||
')
|
||||
|
||||
define(`corenet_raw_send_all_nodes_depend',`
|
||||
attribute node_type;
|
||||
|
||||
class node rawip_send;
|
||||
class capability net_raw;
|
||||
allow $1 node_type:node rawip_send;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -420,15 +353,12 @@ define(`corenet_raw_send_all_nodes_depend',`
|
||||
# corenet_raw_receive_all_nodes(domain)
|
||||
#
|
||||
define(`corenet_raw_receive_all_nodes',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 node_type:node rawip_recv;
|
||||
gen_require(`
|
||||
attribute node_type;
|
||||
class node rawip_recv;
|
||||
')
|
||||
|
||||
define(`corenet_raw_receive_all_nodes_depend',`
|
||||
attribute node_type;
|
||||
|
||||
class node rawip_recv;
|
||||
allow $1 node_type:node rawip_recv;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -445,15 +375,12 @@ define(`corenet_raw_sendrecv_all_nodes',`
|
||||
# corenet_tcp_bind_all_nodes(domain)
|
||||
#
|
||||
define(`corenet_tcp_bind_all_nodes',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 node_type:tcp_socket node_bind;
|
||||
gen_require(`
|
||||
attribute node_type;
|
||||
class tcp_socket node_bind;
|
||||
')
|
||||
|
||||
define(`corenet_tcp_bind_all_nodes_depend',`
|
||||
attribute node_type;
|
||||
|
||||
class tcp_socket node_bind;
|
||||
allow $1 node_type:tcp_socket node_bind;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -461,15 +388,12 @@ define(`corenet_tcp_bind_all_nodes_depend',`
|
||||
# corenet_udp_bind_all_nodes(domain)
|
||||
#
|
||||
define(`corenet_udp_bind_all_nodes',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 node_type:udp_socket node_bind;
|
||||
gen_require(`
|
||||
attribute node_type;
|
||||
class udp_socket node_bind;
|
||||
')
|
||||
|
||||
define(`corenet_udp_bind_all_nodes_depend',`
|
||||
attribute node_type;
|
||||
|
||||
class udp_socket node_bind;
|
||||
allow $1 node_type:udp_socket node_bind;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -477,15 +401,12 @@ define(`corenet_udp_bind_all_nodes_depend',`
|
||||
# corenet_tcp_sendrecv_generic_port(domain)
|
||||
#
|
||||
define(`corenet_tcp_sendrecv_generic_port',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 port_t:tcp_socket { send_msg recv_msg };
|
||||
gen_require(`
|
||||
type port_t;
|
||||
class tcp_socket { send_msg recv_msg };
|
||||
')
|
||||
|
||||
define(`corenet_tcp_sendrecv_generic_port_depend',`
|
||||
type port_t;
|
||||
|
||||
class tcp_socket { send_msg recv_msg };
|
||||
allow $1 port_t:tcp_socket { send_msg recv_msg };
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -493,15 +414,12 @@ define(`corenet_tcp_sendrecv_generic_port_depend',`
|
||||
# corenet_udp_send_generic_port(domain)
|
||||
#
|
||||
define(`corenet_udp_send_generic_port',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 port_t:udp_socket send_msg;
|
||||
gen_require(`
|
||||
type port_t;
|
||||
class udp_socket send_msg;
|
||||
')
|
||||
|
||||
define(`corenet_udp_send_generic_port_depend',`
|
||||
type port_t;
|
||||
|
||||
class udp_socket send_msg;
|
||||
allow $1 port_t:udp_socket send_msg;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -509,15 +427,12 @@ define(`corenet_udp_send_generic_port_depend',`
|
||||
# corenet_udp_receive_generic_port(domain)
|
||||
#
|
||||
define(`corenet_udp_receive_generic_port',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 port_t:udp_socket recv_msg;
|
||||
gen_require(`
|
||||
type port_t;
|
||||
class udp_socket recv_msg;
|
||||
')
|
||||
|
||||
define(`corenet_udp_receive_generic_port_depend',`
|
||||
type port_t;
|
||||
|
||||
class udp_socket recv_msg;
|
||||
allow $1 port_t:udp_socket recv_msg;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -534,15 +449,12 @@ define(`corenet_udp_sendrecv_generic_port',`
|
||||
# corenet_tcp_bind_generic_port(domain)
|
||||
#
|
||||
define(`corenet_tcp_bind_generic_port',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 port_t:tcp_socket name_bind;
|
||||
gen_require(`
|
||||
type port_t;
|
||||
class tcp_socket name_bind;
|
||||
')
|
||||
|
||||
define(`corenet_tcp_bind_generic_port_depend',`
|
||||
type port_t;
|
||||
|
||||
class tcp_socket name_bind;
|
||||
allow $1 port_t:tcp_socket name_bind;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -550,15 +462,12 @@ define(`corenet_tcp_bind_generic_port_depend',`
|
||||
# corenet_udp_bind_generic_port(domain)
|
||||
#
|
||||
define(`corenet_udp_bind_generic_port',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 port_t:udp_socket name_bind;
|
||||
gen_require(`
|
||||
type port_t;
|
||||
class udp_socket name_bind;
|
||||
')
|
||||
|
||||
define(`corenet_udp_bind_generic_port_depend',`
|
||||
type port_t;
|
||||
|
||||
class udp_socket name_bind;
|
||||
allow $1 port_t:udp_socket name_bind;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -566,15 +475,12 @@ define(`corenet_udp_bind_generic_port_depend',`
|
||||
# corenet_tcp_sendrecv_all_ports(domain)
|
||||
#
|
||||
define(`corenet_tcp_sendrecv_all_ports',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 port_type:tcp_socket { send_msg recv_msg };
|
||||
gen_require(`
|
||||
attribute port_type;
|
||||
class tcp_socket { send_msg recv_msg };
|
||||
')
|
||||
|
||||
define(`corenet_tcp_sendrecv_all_ports_depend',`
|
||||
attribute port_type;
|
||||
|
||||
class tcp_socket { send_msg recv_msg };
|
||||
allow $1 port_type:tcp_socket { send_msg recv_msg };
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -582,15 +488,12 @@ define(`corenet_tcp_sendrecv_all_ports_depend',`
|
||||
# corenet_udp_send_all_ports(domain)
|
||||
#
|
||||
define(`corenet_udp_send_all_ports',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 port_type:udp_socket send_msg;
|
||||
gen_require(`
|
||||
attribute port_type;
|
||||
class udp_socket send_msg;
|
||||
')
|
||||
|
||||
define(`corenet_udp_send_all_ports_depend',`
|
||||
attribute port_type;
|
||||
|
||||
class udp_socket send_msg;
|
||||
allow $1 port_type:udp_socket send_msg;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -598,15 +501,12 @@ define(`corenet_udp_send_all_ports_depend',`
|
||||
# corenet_udp_receive_all_ports(domain)
|
||||
#
|
||||
define(`corenet_udp_receive_all_ports',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 port_type:udp_socket recv_msg;
|
||||
gen_require(`
|
||||
attribute port_type;
|
||||
class udp_socket recv_msg;
|
||||
')
|
||||
|
||||
define(`corenet_udp_receive_all_ports_depend',`
|
||||
attribute port_type;
|
||||
|
||||
class udp_socket recv_msg;
|
||||
allow $1 port_type:udp_socket recv_msg;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -623,15 +523,12 @@ define(`corenet_udp_sendrecv_all_ports',`
|
||||
# corenet_tcp_bind_all_ports(domain)
|
||||
#
|
||||
define(`corenet_tcp_bind_all_ports',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 port_type:tcp_socket name_bind;
|
||||
gen_require(`
|
||||
attribute port_type;
|
||||
class tcp_socket name_bind;
|
||||
')
|
||||
|
||||
define(`corenet_tcp_bind_all_ports_depend',`
|
||||
attribute port_type;
|
||||
|
||||
class tcp_socket name_bind;
|
||||
allow $1 port_type:tcp_socket name_bind;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -639,15 +536,12 @@ define(`corenet_tcp_bind_all_ports_depend',`
|
||||
# corenet_udp_bind_all_ports(domain)
|
||||
#
|
||||
define(`corenet_udp_bind_all_ports',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 port_type:udp_socket name_bind;
|
||||
gen_require(`
|
||||
attribute port_type;
|
||||
class udp_socket name_bind;
|
||||
')
|
||||
|
||||
define(`corenet_udp_bind_all_ports_depend',`
|
||||
attribute port_type;
|
||||
|
||||
class udp_socket name_bind;
|
||||
allow $1 port_type:udp_socket name_bind;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -655,15 +549,12 @@ define(`corenet_udp_bind_all_ports_depend',`
|
||||
# corenet_tcp_sendrecv_reserved_port(domain)
|
||||
#
|
||||
define(`corenet_tcp_sendrecv_reserved_port',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 reserved_port_t:tcp_socket { send_msg recv_msg };
|
||||
gen_require(`
|
||||
type reserved_port_t;
|
||||
class tcp_socket { send_msg recv_msg };
|
||||
')
|
||||
|
||||
define(`corenet_tcp_sendrecv_reserved_port_depend',`
|
||||
type reserved_port_t;
|
||||
|
||||
class tcp_socket { send_msg recv_msg };
|
||||
allow $1 reserved_port_t:tcp_socket { send_msg recv_msg };
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -671,15 +562,12 @@ define(`corenet_tcp_sendrecv_reserved_port_depend',`
|
||||
# corenet_udp_send_reserved_port(domain)
|
||||
#
|
||||
define(`corenet_udp_send_reserved_port',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 reserved_port_t:udp_socket send_msg;
|
||||
gen_require(`
|
||||
type reserved_port_t;
|
||||
class udp_socket send_msg;
|
||||
')
|
||||
|
||||
define(`corenet_udp_send_reserved_port_depend',`
|
||||
type reserved_port_t;
|
||||
|
||||
class udp_socket send_msg;
|
||||
allow $1 reserved_port_t:udp_socket send_msg;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -687,15 +575,12 @@ define(`corenet_udp_send_reserved_port_depend',`
|
||||
# corenet_udp_receive_reserved_port(domain)
|
||||
#
|
||||
define(`corenet_udp_receive_reserved_port',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 reserved_port_t:udp_socket recv_msg;
|
||||
gen_require(`
|
||||
type reserved_port_t;
|
||||
class udp_socket recv_msg;
|
||||
')
|
||||
|
||||
define(`corenet_udp_receive_reserved_port_depend',`
|
||||
type reserved_port_t;
|
||||
|
||||
class udp_socket recv_msg;
|
||||
allow $1 reserved_port_t:udp_socket recv_msg;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -712,51 +597,42 @@ define(`corenet_udp_sendrecv_reserved_port',`
|
||||
# corenet_tcp_bind_reserved_port(domain)
|
||||
#
|
||||
define(`corenet_tcp_bind_reserved_port',`
|
||||
gen_require(`$0'_depend)
|
||||
gen_require(`
|
||||
type reserved_port_t;
|
||||
class tcp_socket name_bind;
|
||||
class capability net_bind_service;
|
||||
')
|
||||
|
||||
allow $1 reserved_port_t:tcp_socket name_bind;
|
||||
allow $1 self:capability net_bind_service;
|
||||
')
|
||||
|
||||
define(`corenet_tcp_bind_reserved_port_depend',`
|
||||
type reserved_port_t;
|
||||
|
||||
class tcp_socket name_bind;
|
||||
class capability net_bind_service;
|
||||
')
|
||||
|
||||
#######################################
|
||||
#
|
||||
# corenet_udp_bind_reserved_port(domain)
|
||||
#
|
||||
define(`corenet_udp_bind_reserved_port',`
|
||||
gen_require(`$0'_depend)
|
||||
gen_require(`
|
||||
type reserved_port_t;
|
||||
class udp_socket name_bind;
|
||||
class capability net_bind_service;
|
||||
')
|
||||
|
||||
allow $1 reserved_port_t:udp_socket name_bind;
|
||||
allow $1 self:capability net_bind_service;
|
||||
')
|
||||
|
||||
define(`corenet_udp_bind_reserved_port_depend',`
|
||||
type reserved_port_t;
|
||||
|
||||
class udp_socket name_bind;
|
||||
class capability net_bind_service;
|
||||
')
|
||||
|
||||
#######################################
|
||||
#
|
||||
# corenet_tcp_sendrecv_all_reserved_ports(domain)
|
||||
#
|
||||
define(`corenet_tcp_sendrecv_all_reserved_ports',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 reserved_port_type:tcp_socket { send_msg recv_msg };
|
||||
gen_require(`
|
||||
attribute reserved_port_type;
|
||||
class tcp_socket { send_msg recv_msg };
|
||||
')
|
||||
|
||||
define(`corenet_tcp_sendrecv_all_reserved_ports_depend',`
|
||||
attribute reserved_port_type;
|
||||
|
||||
class tcp_socket { send_msg recv_msg };
|
||||
allow $1 reserved_port_type:tcp_socket { send_msg recv_msg };
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -764,15 +640,12 @@ define(`corenet_tcp_sendrecv_all_reserved_ports_depend',`
|
||||
# corenet_udp_send_all_reserved_ports(domain)
|
||||
#
|
||||
define(`corenet_udp_send_all_reserved_ports',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 reserved_port_type:udp_socket send_msg;
|
||||
gen_require(`
|
||||
attribute reserved_port_type;
|
||||
class udp_socket send_msg;
|
||||
')
|
||||
|
||||
define(`corenet_udp_send_all_reserved_ports_depend',`
|
||||
attribute reserved_port_type;
|
||||
|
||||
class udp_socket send_msg;
|
||||
allow $1 reserved_port_type:udp_socket send_msg;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -780,15 +653,12 @@ define(`corenet_udp_send_all_reserved_ports_depend',`
|
||||
# corenet_udp_receive_all_reserved_ports(domain)
|
||||
#
|
||||
define(`corenet_udp_receive_all_reserved_ports',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
allow $1 reserved_port_type:udp_socket recv_msg;
|
||||
gen_require(`
|
||||
attribute reserved_port_type;
|
||||
class udp_socket recv_msg;
|
||||
')
|
||||
|
||||
define(`corenet_udp_receive_all_reserved_ports_depend',`
|
||||
attribute reserved_port_type;
|
||||
|
||||
class udp_socket recv_msg;
|
||||
allow $1 reserved_port_type:udp_socket recv_msg;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -805,33 +675,27 @@ define(`corenet_udp_sendrecv_all_reserved_ports',`
|
||||
# corenet_tcp_bind_all_reserved_ports(domain)
|
||||
#
|
||||
define(`corenet_tcp_bind_all_reserved_ports',`
|
||||
gen_require(`$0'_depend)
|
||||
gen_require(`
|
||||
attribute reserved_port_type;
|
||||
class tcp_socket name_bind;
|
||||
class capability net_bind_service;
|
||||
')
|
||||
|
||||
allow $1 reserved_port_type:tcp_socket name_bind;
|
||||
allow $1 self:capability net_bind_service;
|
||||
')
|
||||
|
||||
define(`corenet_tcp_bind_all_reserved_ports_depend',`
|
||||
attribute reserved_port_type;
|
||||
|
||||
class tcp_socket name_bind;
|
||||
class capability net_bind_service;
|
||||
')
|
||||
|
||||
#######################################
|
||||
#
|
||||
# corenet_dontaudit_tcp_bind_all_reserved_ports(domain)
|
||||
#
|
||||
define(`corenet_dontaudit_tcp_bind_all_reserved_ports',`
|
||||
gen_require(`$0'_depend)
|
||||
|
||||
dontaudit $1 reserved_port_type:tcp_socket name_bind;
|
||||
gen_require(`
|
||||
attribute reserved_port_type;
|
||||
class tcp_socket name_bind;
|
||||
')
|
||||
|
||||
define(`corenet_dontaudit_tcp_bind_all_reserved_ports_depend',`
|
||||
attribute reserved_port_type;
|
||||
|
||||
class tcp_socket name_bind;
|
||||
dontaudit $1 reserved_port_type:tcp_socket name_bind;
|
||||
')
|
||||
|
||||
#######################################
|
||||
@ -839,31 +703,25 @@ define(`corenet_dontaudit_tcp_bind_all_reserved_ports_depend',`
|
||||
# corenet_udp_bind_all_reserved_ports(domain)
|
||||
#
|
||||
define(`corenet_udp_bind_all_reserved_ports',`
|
||||
gen_require(`$0'_depend)
|
||||
gen_require(`
|
||||
attribute reserved_port_type;
|
||||
class udp_socket name_bind;
|
||||
class self:capability net_bind_service;
|
||||
')
|
||||
|
||||
allow $1 reserved_port_type:udp_socket name_bind;
|
||||
allow $1 self:capability net_bind_service;
|
||||
')
|
||||
|
||||
define(`corenet_udp_bind_all_reserved_ports_depend',`
|
||||
attribute reserved_port_type;
|
||||
|
||||
class udp_socket name_bind;
|
||||
class self:capability net_bind_service;
|
||||
')
|
||||
|
||||
#######################################
|
||||
#
|
||||
# corenet_dontaudit_udp_bind_all_reserved_ports(domain)
|
||||
#
|
||||
define(`corenet_dontaudit_udp_bind_all_reserved_ports',`
|
||||
gen_require(`$0'_depend)
|
||||
gen_require(`
|
||||
attribute reserved_port_type;
|
||||
class udp_socket name_bind;
|
||||
')
|
||||
|
||||
dontaudit $1 reserved_port_type:udp_socket name_bind;
|
||||
')
|
||||
|
||||
define(`corenet_dontaudit_udp_bind_all_reserved_ports_depend',`
|
||||
attribute reserved_port_type;
|
||||
|
||||
class udp_socket name_bind;
|
||||
')
|
||||
|
Loading…
Reference in New Issue
Block a user