Skip to content

Commit

Permalink
Revert "libfs_avb: Disable dm-verity when AVB is permissive"
Browse files Browse the repository at this point in the history
This reverts commit 706d088.
  • Loading branch information
neobuddy89 committed Apr 6, 2022
1 parent 083da82 commit 552ed0b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs_mgr/libfs_avb/fs_avb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,7 @@ AvbUniquePtr AvbHandle::LoadAndVerifyVbmeta(
bool verification_disabled = ((AvbVBMetaImageFlags)vbmeta_header->flags &
AVB_VBMETA_IMAGE_FLAGS_VERIFICATION_DISABLED);
bool hashtree_disabled =
((AvbVBMetaImageFlags)vbmeta_header->flags & AVB_VBMETA_IMAGE_FLAGS_HASHTREE_DISABLED) ||
allow_verification_error;
((AvbVBMetaImageFlags)vbmeta_header->flags & AVB_VBMETA_IMAGE_FLAGS_HASHTREE_DISABLED);
if (verification_disabled) {
avb_handle->status_ = AvbHandleStatus::kVerificationDisabled;
} else if (hashtree_disabled) {
Expand Down Expand Up @@ -458,8 +457,7 @@ AvbUniquePtr AvbHandle::Open() {
// - vbmeta struct in all partitions are still processed, just disable
// dm-verity in the user space.
bool hashtree_disabled =
((AvbVBMetaImageFlags)vbmeta_header.flags & AVB_VBMETA_IMAGE_FLAGS_HASHTREE_DISABLED) ||
allow_verification_error;
((AvbVBMetaImageFlags)vbmeta_header.flags & AVB_VBMETA_IMAGE_FLAGS_HASHTREE_DISABLED);

if (verification_disabled) {
avb_handle->status_ = AvbHandleStatus::kVerificationDisabled;
Expand Down

0 comments on commit 552ed0b

Please sign in to comment.