Merge "fs_mgr: allow disable dm-verity when the device is unlocked without metadata"
This commit is contained in:
commit
17c84b2cca
1 changed files with 6 additions and 0 deletions
|
|
@ -30,6 +30,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <android-base/file.h>
|
#include <android-base/file.h>
|
||||||
|
#include <android-base/properties.h>
|
||||||
#include <android-base/strings.h>
|
#include <android-base/strings.h>
|
||||||
#include <android-base/unique_fd.h>
|
#include <android-base/unique_fd.h>
|
||||||
#include <crypto_utils/android_pubkey.h>
|
#include <crypto_utils/android_pubkey.h>
|
||||||
|
|
@ -874,6 +875,11 @@ int fs_mgr_setup_verity(struct fstab_rec *fstab, bool wait_for_verity_dev)
|
||||||
// read verity metadata
|
// read verity metadata
|
||||||
if (fec_verity_get_metadata(f, &verity) < 0) {
|
if (fec_verity_get_metadata(f, &verity) < 0) {
|
||||||
PERROR << "Failed to get verity metadata '" << fstab->blk_device << "'";
|
PERROR << "Failed to get verity metadata '" << fstab->blk_device << "'";
|
||||||
|
// Allow verity disabled when the device is unlocked without metadata
|
||||||
|
if ("0" == android::base::GetProperty("ro.boot.flash.locked", "")) {
|
||||||
|
retval = FS_MGR_SETUP_VERITY_DISABLED;
|
||||||
|
LWARNING << "Allow invalid metadata when the device is unlocked";
|
||||||
|
}
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue