Commit graph

5 commits

Author SHA1 Message Date
Nikita Ioffe
7ba5030dcc Fix potential use-after-free bug in reboot
Instead of operating on raw pointers, init now uses name of the
services as it's primary identifier. Only place that still uses
vector<Service*> is StopServices.

In addition, ServiceList::services() function is removed, which should
help avoiding similar bugs in the future.

Bug: 170315126
Bug: 174335499
Test: adb reboot
Test: atest CtsInitTestCases
Change-Id: I73ecd7a8c58c2ec3732934c595b7f7db814b7034
Merged-In: I73ecd7a8c58c2ec3732934c595b7f7db814b7034
Ignore-AOSP-First: fixing security vulnerability
(cherry picked from commit 8d6ae2dd8a)
2020-12-02 16:11:22 +00:00
Tom Cherry
a2f9136b2c Refactor libinit_test_utils to not use libinit and expose its libraries
Users of libinit_test_utils must include all libraries that it uses.
If it uses libinit, then there is a large number of libraries that
must be included.  To avoid this, make libinit_test_utils only use
init_common_sources and the small number of required libraries that go
along with those sources.  Additionally, expose these sources as a
default for users of libinit_test_utils.

Test: build
Change-Id: I224fa7e0590d073e4cd40412b5dcb6f72a64b6bf
2020-02-20 11:31:35 -08:00
Steven Moreland
504e6647ff libinit_test_utils: -= libhidl-gen-utils header
Bug: N/A
Test: N/A
Change-Id: Idd558c395dfe19af9fe654941cd77bc94d3d74f4
2020-02-10 10:41:29 -08:00
Steven Moreland
bb44cd6ea1 libinit_test_utils: don't assume interface format
These can be AIDL or HIDL interfaces. Avoiding assuming the format here.

Bug: 141008902
Test: vts_ibase_test
Change-Id: If60367e3a46c74a1d28548379655f5e211f58b73
2020-02-07 13:39:35 -08:00
Daniel Norman
d19c5a5076 Adds a library to parse service info from init_rc files for use in tests.
Bug: 138114550
Test: used in vts_ibase_test
Change-Id: Ibadc2a76d6112b5778d3a282a1e05ffc74511623
2019-07-31 11:33:47 -07:00