Commit 4a2bdd80 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.

BUG: 24143423
BUG: 24267261
TEST: metricsd starts and find the main disk without any SELinux denial.

Change-Id: I4c0fb2800ac84ff451974990c6228ee10528c0f0
parent 70c3349d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment