Merge "Statsd: Allow statsd to contact perfprofd in userdebug"

This commit is contained in:
Treehugger Robot 2018-03-28 01:27:35 +00:00 committed by Gerrit Code Review
commit b862c7aeeb
3 changed files with 8 additions and 5 deletions

View file

@ -2,3 +2,7 @@ userdebug_or_eng(`
typeattribute perfprofd coredomain; typeattribute perfprofd coredomain;
init_daemon_domain(perfprofd) init_daemon_domain(perfprofd)
') ')
# Only servicemanager, statsd, su and systemserver can communicate.
neverallow { domain userdebug_or_eng(`-statsd') } perfprofd:binder call;
neverallow perfprofd { domain userdebug_or_eng(`-servicemanager -statsd -su -system_server') }:binder call;

View file

@ -30,6 +30,9 @@ allow statsd stats_data_file:file create_file_perms;
binder_call(statsd, appdomain) binder_call(statsd, appdomain)
binder_call(statsd, healthd) binder_call(statsd, healthd)
binder_call(statsd, incidentd) binder_call(statsd, incidentd)
userdebug_or_eng(`
binder_call(statsd, perfprofd)
')
binder_call(statsd, statscompanion_service) binder_call(statsd, statscompanion_service)
binder_call(statsd, system_server) binder_call(statsd, system_server)

View file

@ -113,9 +113,5 @@ userdebug_or_eng(`
# Allow perfprofd to submit to dropbox. # Allow perfprofd to submit to dropbox.
allow perfprofd dropbox_service:service_manager find; allow perfprofd dropbox_service:service_manager find;
allow perfprofd system_server:binder call; binder_call(perfprofd, system_server)
# Only servicemanager, su and systemserver can communicate.
neverallow domain perfprofd:binder call;
neverallow perfprofd { domain -servicemanager -su -system_server }:binder call;
') ')