mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
Fix checking boot flags in developer mode.
Should only check in recovery or normal modes. BUG=http://code.google.com/p/chrome-os-partner/issues/detail?id=497 Review URL: http://codereview.chromium.org/2806058
This commit is contained in:
@@ -211,18 +211,21 @@ int LoadKernel(LoadKernelParams* params) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Check the key block flags against the current boot mode */
|
||||
if (!(key_block->key_block_flags &
|
||||
(is_dev ? KEY_BLOCK_FLAG_DEVELOPER_1 :
|
||||
KEY_BLOCK_FLAG_DEVELOPER_0))) {
|
||||
VBDEBUG(("Developer flag mismatch.\n"));
|
||||
continue;
|
||||
}
|
||||
if (!(key_block->key_block_flags &
|
||||
(is_rec ? KEY_BLOCK_FLAG_RECOVERY_1 :
|
||||
KEY_BLOCK_FLAG_RECOVERY_0))) {
|
||||
VBDEBUG(("Recovery flag mismatch.\n"));
|
||||
continue;
|
||||
/* Check the key block flags against the current boot mode in normal
|
||||
* and recovery modes (not in developer mode booting from SSD). */
|
||||
if (is_rec || is_normal) {
|
||||
if (!(key_block->key_block_flags &
|
||||
(is_dev ? KEY_BLOCK_FLAG_DEVELOPER_1 :
|
||||
KEY_BLOCK_FLAG_DEVELOPER_0))) {
|
||||
VBDEBUG(("Developer flag mismatch.\n"));
|
||||
continue;
|
||||
}
|
||||
if (!(key_block->key_block_flags &
|
||||
(is_rec ? KEY_BLOCK_FLAG_RECOVERY_1 :
|
||||
KEY_BLOCK_FLAG_RECOVERY_0))) {
|
||||
VBDEBUG(("Recovery flag mismatch.\n"));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for rollback of key version. Note this is implicitly
|
||||
|
||||
@@ -1 +1 @@
|
||||
char* VbootVersion = "VBOOv=45bbe227";
|
||||
char* VbootVersion = "VBOOv=e5373ca7";
|
||||
|
||||
Reference in New Issue
Block a user