apexd: Add logic to validate content of a shim apex
Allowed entries:
* apex_manifest.json - must be a regular file with 0644 permissions mask
* lost+found - must be an empty folder
* etc - must be a folder containing exactly one file hash.txt
* etc/hash.txt - must be a regular file with 0644 permissions mask
This CL required some boilerplate, mostly to make sure that we are using
non-throwing std::filesystem APIs.
I've left some TODOs to refactor some of the boilerplate, e.g. add a way
to use range-based for loop over directory in a non-throwing way.
Test: apexservice_test
Bug: 128625955
Change-Id: I0ee7c34e365f977a627981beac116bd35af08612
7 files changed