OSDN Git Service

Make init process create PDX sockets for services
authorAlex Vakulenko <avakulenko@google.com>
Fri, 24 Mar 2017 00:45:40 +0000 (17:45 -0700)
committerAlex Vakulenko <avakulenko@google.com>
Wed, 5 Apr 2017 15:34:46 +0000 (08:34 -0700)
commit409c6eecdca80e95a110d63bc70b1c2dfcf49100
treee30f47579862069191065b59bc31cb63c97338e3
parent585e32faccaf80cf51e8148959abfbee49624b97
Make init process create PDX sockets for services

To help us control the creation of PDX sockets and properly labeling
them for SELinux, let the init process create sockets for us based on
the settings specified in .rc files for service processes.

For (test) services that are meant to be started manually from command
line (e.g. test services), keep the old functionality as an option so
that UDS endpoint can be created in a way that it automatically creates
the socket in the service itself.

Bug: 35220925
Test: `m -j32` succeeds. Ran sailfish in VR mode and made sure all the
      services (surfaceflinger, performanced, sensord, bufferhub).
      `m -j32 checkbuild` succeeds as well.

Change-Id: Ief733b41b534cea19b1bea31de76b06051aa50ab
libs/vr/libpdx_default_transport/Android.bp
libs/vr/libpdx_uds/Android.bp
libs/vr/libpdx_uds/channel_event_set.cpp
libs/vr/libpdx_uds/private/uds/service_endpoint.h
libs/vr/libpdx_uds/service_dispatcher.cpp
libs/vr/libpdx_uds/service_endpoint.cpp
services/surfaceflinger/surfaceflinger.rc
services/vr/bufferhubd/bufferhubd.rc
services/vr/performanced/performanced.rc
services/vr/sensord/sensord.rc