Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0eb05166 authored by Sami Tolvanen's avatar Sami Tolvanen Committed by Stephen Barber
Browse files

DO NOT MERGE: fs_mgr: set partition.*.verified property even without state

Set properties on verity_update_state even if verity state management
is not used.

Bug: 24865045
Change-Id: I3f0829e374cf3b889bb417830ba488f1266de4aa
parent 69406d90
Loading
Loading
Loading
Loading
+6 −11
Original line number Diff line number Diff line
@@ -870,8 +870,9 @@ int fs_mgr_load_verity_state(int *mode)
            continue;
        }

        if (current == VERITY_MODE_LOGGING) {
        if (current != VERITY_MODE_DEFAULT) {
            *mode = current;
            break;
        }
    }

@@ -905,11 +906,12 @@ int fs_mgr_update_verity_state(fs_mgr_verity_state_callback callback)
    property_get("ro.boot.veritymode", propbuf, "");

    if (*propbuf != '\0') {
        use_state = false; /* state is kept by the bootloader */
    }

    if (fs_mgr_load_verity_state(&mode) == -1) {
        return -1;
    }
        use_state = false; /* state is kept by the bootloader */
    }

    fd = TEMP_FAILURE_RETRY(open("/dev/device-mapper", O_RDWR | O_CLOEXEC));

@@ -933,13 +935,6 @@ int fs_mgr_update_verity_state(fs_mgr_verity_state_callback callback)
            continue;
        }

        if (use_state) {
            if (get_verity_state_offset(&fstab->recs[i], &offset) < 0 ||
                read_verity_state(fstab->recs[i].verity_loc, offset, &mode) < 0) {
                continue;
            }
        }

        mount_point = basename(fstab->recs[i].mount_point);
        verity_ioctl_init(io, mount_point, 0);