eaa18ce0aa
Almost 1:1 of the sepolicy for ephemeral apps Test: make Bug: 203670791 Ignore-AOSP-First: Feature is developed in internal branch Change-Id: Ib085c49f29dab47268e479fe5266490a66adaa87
26 lines
787 B
Text
26 lines
787 B
Text
## Network types
|
|
type node, node_type;
|
|
type netif, netif_type;
|
|
type port, port_type;
|
|
|
|
###
|
|
### Domain with network access
|
|
###
|
|
|
|
# Use network sockets.
|
|
allow netdomain self:tcp_socket create_stream_socket_perms;
|
|
allow netdomain self:{ icmp_socket udp_socket rawip_socket } create_socket_perms;
|
|
|
|
# Connect to ports.
|
|
allow netdomain port_type:tcp_socket name_connect;
|
|
# See changes to the routing table.
|
|
allow netdomain self:netlink_route_socket { create read getattr write setattr lock append connect getopt setopt shutdown nlmsg_read };
|
|
|
|
# Talks to netd via dnsproxyd socket.
|
|
unix_socket_connect(netdomain, dnsproxyd, netd)
|
|
|
|
# Talks to netd via fwmarkd socket.
|
|
unix_socket_connect(netdomain, fwmarkd, netd)
|
|
|
|
# Connect to mdnsd via mdnsd socket.
|
|
unix_socket_connect(netdomain, mdnsd, mdnsd)
|