Commit 9d44d9dd authored by Bertrand SIMONNET's avatar Bertrand SIMONNET
Browse files

rootdev: Don't try to access /dev/block.

When the device used to back a path is found in /sys/block, rootdev will
double check that /dev/block/<device name> exists and that the dev_t
matches the one in /sys/block/.
On Android, the manufacturer can add an SELinux context for that device
node which will prevent core daemons from accessing it, failing the call
to rootdev.

To avoid this, rootdev should return the device node path without trying
to access it.

This CL also enable building with Clang to ensure we use the strictest
compiler possible.

BUG: 24143423
BUG: 24267261
TEST: metricsd starts and find the main disk without any SELinux denial.
TEST: builds with clang and -Werror.

Change-Id: Icfe64695c28277d4c8eb9c89de1e13a767a703b8
parent 134aa097
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment