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 | |
| 8 | # Allow netd to start clatd in its own domain |
| 9 | domain_auto_trans(netd, clatd_exec, clatd) |
Chenbo Feng | 566411e | 2018-01-02 15:31:18 -0800 | [diff] [blame] | 10 | |
Chenbo Feng | 7b57104 | 2018-12-04 17:57:27 -0800 | [diff] [blame] | 11 | # give netd permission to setup iptables rule with xt_bpf, attach program to cgroup, and read/write |
| 12 | # the map created by bpfloader |
| 13 | allow netd bpfloader:bpf { prog_run map_read map_write }; |
Joel Fernandes | b76a639 | 2019-01-11 08:32:45 -0500 | [diff] [blame] | 14 | |
Chenbo Feng | 8a5539b | 2019-02-27 17:44:26 -0800 | [diff] [blame] | 15 | # in order to invoke side effect of close() on such a socket calling synchronize_rcu() |
| 16 | # TODO: Remove this permission when 4.9 kernel is deprecated. |
| 17 | allow netd self:key_socket create; |
| 18 | |
Joel Fernandes | b76a639 | 2019-01-11 08:32:45 -0500 | [diff] [blame] | 19 | get_prop(netd, bpf_progs_loaded_prop) |
lifr | 980c08c | 2018-11-21 22:53:48 +0800 | [diff] [blame] | 20 | |
| 21 | # Allow netd to write to statsd. |
| 22 | unix_socket_send(netd, statsdw, statsd) |
Remi NGUYEN VAN | 780fbad | 2019-01-28 13:08:42 +0900 | [diff] [blame] | 23 | |
| 24 | # Allow netd to send callbacks to network_stack |
| 25 | binder_call(netd, network_stack) |
| 26 | |
Chalard Jean | a4c9f7b | 2019-04-05 17:33:56 +0900 | [diff] [blame] | 27 | # Allow netd to send dump info to dumpstate |
| 28 | allow netd dumpstate:fd use; |
| 29 | allow netd dumpstate:fifo_file { getattr write }; |