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:
Randall Spangler
2010-07-19 18:26:35 -07:00
parent 87c13d806b
commit ae029d9109
2 changed files with 16 additions and 13 deletions

View File

@@ -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

View File

@@ -1 +1 @@
char* VbootVersion = "VBOOv=45bbe227";
char* VbootVersion = "VBOOv=e5373ca7";