1typeattribute netd coredomain; 2 3init_daemon_domain(netd) 4 5# Allow netd to spawn dnsmasq in it's own domain 6domain_auto_trans(netd, dnsmasq_exec, dnsmasq) 7 8# Allow netd to start clatd in its own domain and kill it 9domain_auto_trans(netd, clatd_exec, clatd) 10allow netd clatd:process signal; 11 12# give netd permission to setup iptables rule with xt_bpf, attach program to cgroup, and read/write 13# the map created by bpfloader 14allow netd bpfloader:bpf { prog_run map_read map_write }; 15 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. 18allow netd self:key_socket create; 19 20set_prop(netd, ctl_mdnsd_prop) 21set_prop(netd, netd_stable_secret_prop) 22 23get_prop(netd, adbd_config_prop) 24get_prop(netd, bpf_progs_loaded_prop) 25get_prop(netd, hwservicemanager_prop) 26get_prop(netd, device_config_netd_native_prop) 27 28# Allow netd to write to statsd. 29unix_socket_send(netd, statsdw, statsd) 30 31# Allow netd to send callbacks to network_stack 32binder_call(netd, network_stack) 33 34# Allow netd to send dump info to dumpstate 35allow netd dumpstate:fd use; 36allow netd dumpstate:fifo_file { getattr write }; 37 38# persist.netd.stable_secret contains RFC 7217 secret key which should never be 39# leaked to other processes. Make sure it never leaks. 40neverallow { domain -netd -init -dumpstate } netd_stable_secret_prop:file r_file_perms; 41 42# We want to ensure that no other process ever tries tampering with persist.netd.stable_secret, 43# the RFC 7217 secret key managed by netd. Doing so could compromise user privacy. 44neverallow { domain -netd -init } netd_stable_secret_prop:property_service set; 45