• Igor's avatar
    Fix the device disabled case at FrE check. · cbe2bc9f
    Igor authored
    When the device is disabled, we receive from the server
    RESTORE_MODE_DISABLED mode. The client has no information if the policy
    forces to re-enroll or not. In the initial implementation it was treated
    as device not being forced to re-enroll. This change fixes that case, so
    that the flags from VPD don't get deleted for disabled device.
    
    Also with a test image, the install_attributes file is deleted while
    the checksum remain on disk. This has yet to be investigated, but to
    avoid any problems when install_attributes file is corrupted, we set
    the device as being in DEVICE_MODE_ENTERPRISE if auto_enrollment
    detects the device is disabled.
    
    BUG=chromium:996059
    TEST=Manual tests and unit tests
    
    Change-Id: I8bc30028af043fdb563e6374d7e5db4b30830218
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1771966Reviewed-by: default avatarIgor <igorcov@chromium.org>
    Reviewed-by: default avatarBartosz Fabianowski <bartfab@chromium.org>
    Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
    Commit-Queue: Igor <igorcov@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#692052}
    cbe2bc9f
auto_enrollment_client.h 5.12 KB