summaryrefslogtreecommitdiff
path: root/init/builtins.cpp
diff options
context:
space:
mode:
authorPaul Crowley <paulcrowley@google.com>2020-08-14 11:05:05 -0700
committerPaul Crowley <paulcrowley@google.com>2020-08-14 11:36:39 -0700
commit9acab5a4d6df53e05b810a6b22a6bc44271cefbc (patch)
tree64c98d325c76b9b99016f320af205bdec9879eb1 /init/builtins.cpp
parent0398117a9a89bef7e35310f0480362755f623860 (diff)
Set ro.crypto.type even on failure
Move responsibility for setting ro.crypto.type into fs_mgr_mount_all, so that even if setting up the filesystem fails, the type is set correctly and so errors are appropriately handled. Bug: 162289984 Test: simulate a failure and check that it's set. Change-Id: Ib061a454e7e21d7206c3c1fa8e88e16618099581
Diffstat (limited to 'init/builtins.cpp')
-rw-r--r--init/builtins.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/init/builtins.cpp b/init/builtins.cpp
index 0b456e70a..f5de1adf1 100644
--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -570,7 +570,6 @@ static Result<void> queue_fs_event(int code, bool userdata_remount) {
trigger_shutdown("reboot,requested-userdata-remount-on-fde-device");
}
SetProperty("ro.crypto.state", "encrypted");
- SetProperty("ro.crypto.type", "block");
ActionManager::GetInstance().QueueEventTrigger("defaultcrypto");
return {};
} else if (code == FS_MGR_MNTALL_DEV_NOT_ENCRYPTED) {
@@ -595,7 +594,6 @@ static Result<void> queue_fs_event(int code, bool userdata_remount) {
return Error() << "FscryptInstallKeyring() failed";
}
SetProperty("ro.crypto.state", "encrypted");
- SetProperty("ro.crypto.type", "file");
// Although encrypted, we have device key, so we do not need to
// do anything different from the nonencrypted case.
@@ -606,7 +604,6 @@ static Result<void> queue_fs_event(int code, bool userdata_remount) {
return Error() << "FscryptInstallKeyring() failed";
}
SetProperty("ro.crypto.state", "encrypted");
- SetProperty("ro.crypto.type", "file");
// Although encrypted, vold has already set the device up, so we do not need to
// do anything different from the nonencrypted case.
@@ -617,7 +614,6 @@ static Result<void> queue_fs_event(int code, bool userdata_remount) {
return Error() << "FscryptInstallKeyring() failed";
}
SetProperty("ro.crypto.state", "encrypted");
- SetProperty("ro.crypto.type", "file");
// Although encrypted, vold has already set the device up, so we do not need to
// do anything different from the nonencrypted case.