summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Eric Biggers <ebiggers@google.com> 2022-01-24 20:33:11 +0000
committer Eric Biggers <ebiggers@google.com> 2022-03-25 23:24:51 +0000
commite1f17026ca80e43952fcc5d3a246615b711eba0a (patch)
tree23456bf33f11cfb9e0d74c25b05ff0100d5d0de7 /api/api.go
parent567e7a0476a3251d02705932268cd5f395ef863f (diff)
UserDataPreparer: reboot to recovery if preparing user storage fails
StorageManager.prepareUserStorage() can throw an exception if a directory cannot be encrypted, for example due to already being nonempty. In this case, usage of the directory must not be allowed to proceed. UserDataPreparer currently handles this by deleting the user's directories, but the error is still ultimately suppressed and starting the user is still allowed to proceed. The correct behavior in this case is to reboot into recovery to ask the user to factory reset the device. This is already what happens when 'init' fails to encrypt a directory with the system DE policy. However, this was overlooked for the user directories. Start doing this. Bug: 164488924 Bug: 224585613 Change-Id: Ib5e91d2510b25780d7a161b91b5cee2f6f7a2e54 (cherry picked from commit 5256365e65882b81509ec2f6b9dfe2dcf0025254) Merged-In: Ib5e91d2510b25780d7a161b91b5cee2f6f7a2e54
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions