Fix netd crash in checkUserNetworkAccessLocked()
SIGABRT happens when unprivileged applications call Network.bindSocket
with a local network (netId=99). Netd statically cast a LocalNetwork
object to PhysicalNetwork, call member function getPermission().
However, the function exists in PhysicalNetwork only.
This commit makes getPermission() as a pure virtual function in the
ancestor class and implements it in each subclass.
Bug: 255954808
Test: atest netdclient_root_test
Change-Id: Ibe1eabe6ff4dc4ee124b820d596bb16c3fe371b2
9 files changed