2017-03-23 22:27:32 +01:00
|
|
|
typeattribute netd coredomain;
|
|
|
|
|
2016-07-22 22:13:11 +02:00
|
|
|
init_daemon_domain(netd)
|
|
|
|
|
|
|
|
# Allow netd to spawn dnsmasq in it's own domain
|
|
|
|
domain_auto_trans(netd, dnsmasq_exec, dnsmasq)
|
|
|
|
|
2019-05-09 03:50:27 +02:00
|
|
|
# Allow netd to start clatd in its own domain and kill it
|
2016-07-22 22:13:11 +02:00
|
|
|
domain_auto_trans(netd, clatd_exec, clatd)
|
2019-05-09 03:50:27 +02:00
|
|
|
allow netd clatd:process signal;
|
2018-01-03 00:31:18 +01:00
|
|
|
|
2018-12-05 02:57:27 +01:00
|
|
|
# give netd permission to setup iptables rule with xt_bpf, attach program to cgroup, and read/write
|
|
|
|
# the map created by bpfloader
|
|
|
|
allow netd bpfloader:bpf { prog_run map_read map_write };
|
2019-01-11 14:32:45 +01:00
|
|
|
|
2019-02-28 02:44:26 +01:00
|
|
|
# in order to invoke side effect of close() on such a socket calling synchronize_rcu()
|
|
|
|
# TODO: Remove this permission when 4.9 kernel is deprecated.
|
|
|
|
allow netd self:key_socket create;
|
|
|
|
|
2019-01-11 14:32:45 +01:00
|
|
|
get_prop(netd, bpf_progs_loaded_prop)
|
2018-11-21 15:53:48 +01:00
|
|
|
|
|
|
|
# Allow netd to write to statsd.
|
|
|
|
unix_socket_send(netd, statsdw, statsd)
|
2019-01-28 05:08:42 +01:00
|
|
|
|
|
|
|
# Allow netd to send callbacks to network_stack
|
|
|
|
binder_call(netd, network_stack)
|
|
|
|
|
2019-04-05 10:33:56 +02:00
|
|
|
# Allow netd to send dump info to dumpstate
|
|
|
|
allow netd dumpstate:fd use;
|
|
|
|
allow netd dumpstate:fifo_file { getattr write };
|