Alex Klyubin | f5446eb | 2017-03-23 14:27:32 -0700 | [diff] [blame] | 1 | typeattribute netd coredomain; |
| 2 | |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 3 | init_daemon_domain(netd) |
| 4 | |
| 5 | # Allow netd to spawn dnsmasq in it's own domain |
| 6 | domain_auto_trans(netd, dnsmasq_exec, dnsmasq) |
| 7 | |
Maciej Żenczykowski | 44328c0 | 2019-05-08 18:50:27 -0700 | [diff] [blame] | 8 | # Allow netd to start clatd in its own domain and kill it |
dcashman | cc39f63 | 2016-07-22 13:13:11 -0700 | [diff] [blame] | 9 | domain_auto_trans(netd, clatd_exec, clatd) |
Maciej Żenczykowski | 44328c0 | 2019-05-08 18:50:27 -0700 | [diff] [blame] | 10 | allow netd clatd:process signal; |
Chenbo Feng | 566411e | 2018-01-02 15:31:18 -0800 | [diff] [blame] | 11 | |
Chenbo Feng | 7b57104 | 2018-12-04 17:57:27 -0800 | [diff] [blame] | 12 | # give netd permission to setup iptables rule with xt_bpf, attach program to cgroup, and read/write |
| 13 | # the map created by bpfloader |
| 14 | allow netd bpfloader:bpf { prog_run map_read map_write }; |
Joel Fernandes | b76a639 | 2019-01-11 08:32:45 -0500 | [diff] [blame] | 15 | |
Chenbo Feng | 8a5539b | 2019-02-27 17:44:26 -0800 | [diff] [blame] | 16 | # in order to invoke side effect of close() on such a socket calling synchronize_rcu() |
| 17 | # TODO: Remove this permission when 4.9 kernel is deprecated. |
| 18 | allow netd self:key_socket create; |
| 19 | |
Joel Fernandes | b76a639 | 2019-01-11 08:32:45 -0500 | [diff] [blame] | 20 | get_prop(netd, bpf_progs_loaded_prop) |
lifr | 980c08c | 2018-11-21 22:53:48 +0800 | [diff] [blame] | 21 | |
| 22 | # Allow netd to write to statsd. |
| 23 | unix_socket_send(netd, statsdw, statsd) |
Remi NGUYEN VAN | 780fbad | 2019-01-28 13:08:42 +0900 | [diff] [blame] | 24 | |
| 25 | # Allow netd to send callbacks to network_stack |
| 26 | binder_call(netd, network_stack) |
| 27 | |
Chalard Jean | a4c9f7b | 2019-04-05 17:33:56 +0900 | [diff] [blame] | 28 | # Allow netd to send dump info to dumpstate |
| 29 | allow netd dumpstate:fd use; |
| 30 | allow netd dumpstate:fifo_file { getattr write }; |