Sepolicy for netutils_wrapper to use binder call

Bug: 65862741
Test: built, flashed, booted

Merged-In: I346520c47b74fde5137ad7c777f0a9eca50a06d7
(cherry picked from commit 554b334d7b)

Change-Id: I0a03b88369bd2eca6593d252c4dff3ce7745b6cc
This commit is contained in:
Luke Huang 2019-04-24 22:18:05 -07:00
parent 1739bceaab
commit 2cdbd3a38c
2 changed files with 6 additions and 2 deletions

View File

@ -15,8 +15,10 @@ allow netutils_wrapper self:netlink_route_socket ~ioctl;
allow netutils_wrapper self:netlink_xfrm_socket ~ioctl;
# For netutils (ndc) to be able to talk to netd
allow netutils_wrapper netd_socket:sock_file { open getattr read write append };
allow netutils_wrapper netd:unix_stream_socket { read getattr connectto };
allow netutils_wrapper netd_service:service_manager find;
allow netutils_wrapper dnsresolver_service:service_manager find;
binder_use(netutils_wrapper);
binder_call(netutils_wrapper, netd);
# For vendor code that update the iptables rules at runtime. They need to reload
# the whole chain including the xt_bpf rules. They need to access to the pinned

View File

@ -138,6 +138,7 @@ neverallow {
-dumpstate
-network_stack
-netd
-netutils_wrapper
} netd_service:service_manager find;
# only system_server, dumpstate and network stack app may find dnsresolver service
@ -147,6 +148,7 @@ neverallow {
-dumpstate
-network_stack
-netd
-netutils_wrapper
} dnsresolver_service:service_manager find;
# only netd can create the bpf maps