980c08c999
config sepolicy to allow netd to write to statsd. Test: run runtests.sh, make sure no missing test and get all pass run /out/host/linux-x86/bin/statsd_testdrive 82 Got following metric data dump:pass for local test Bug: 119862317 Change-Id: Ieff5ca55de46715d54ef57c4a6d144fd7d03e4b7
18 lines
547 B
Text
18 lines
547 B
Text
typeattribute netd coredomain;
|
|
|
|
init_daemon_domain(netd)
|
|
|
|
# Allow netd to spawn dnsmasq in it's own domain
|
|
domain_auto_trans(netd, dnsmasq_exec, dnsmasq)
|
|
|
|
# Allow netd to start clatd in its own domain
|
|
domain_auto_trans(netd, clatd_exec, clatd)
|
|
|
|
# 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 };
|
|
|
|
get_prop(netd, bpf_progs_loaded_prop)
|
|
|
|
# Allow netd to write to statsd.
|
|
unix_socket_send(netd, statsdw, statsd)
|