|
|
d4a4eb |
From dcbc74b01bfb360eecadb8e59480472b86fe63d0 Mon Sep 17 00:00:00 2001
|
|
|
d4a4eb |
From: Jonathan Lebon <jonathan@jlebon.com>
|
|
|
d4a4eb |
Date: Tue, 29 Oct 2019 09:35:41 -0400
|
|
|
d4a4eb |
Subject: [PATCH] 01fips: fix HMAC file path resolution
|
|
|
d4a4eb |
|
|
|
d4a4eb |
There is a small regression in #343: when handling the 'separate boot
|
|
|
d4a4eb |
partition' case, we're checking for the kernel image in the wrong
|
|
|
d4a4eb |
location: `BOOT_IMAGE` is the `/boot`-relative path to the kernel image,
|
|
|
d4a4eb |
so `/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE}` expands to e.g.
|
|
|
d4a4eb |
`/boot/mysubdir1/mysubdir2/mysubdir1/mysubdir2/vmlinuz...`.
|
|
|
d4a4eb |
|
|
|
d4a4eb |
We should be using `BOOT_IMAGE_NAME` here instead (and in fact, the next
|
|
|
d4a4eb |
if-statement does this correctly, so it might've just been accidentally
|
|
|
d4a4eb |
left out of #343).
|
|
|
d4a4eb |
---
|
|
|
d4a4eb |
modules.d/01fips/fips.sh | 2 +-
|
|
|
d4a4eb |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
d4a4eb |
|
|
|
d4a4eb |
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
|
|
|
d4a4eb |
index beaa692b..c3dbcf74 100755
|
|
|
d4a4eb |
--- a/modules.d/01fips/fips.sh
|
|
|
d4a4eb |
+++ b/modules.d/01fips/fips.sh
|
|
|
d4a4eb |
@@ -118,7 +118,7 @@ do_fips()
|
|
|
d4a4eb |
|
|
|
d4a4eb |
if [ -z "$BOOT_IMAGE_NAME" ]; then
|
|
|
d4a4eb |
BOOT_IMAGE_NAME="vmlinuz-${KERNEL}"
|
|
|
d4a4eb |
- elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE}" ]; then
|
|
|
d4a4eb |
+ elif ! [ -e "/boot/${BOOT_IMAGE_PATH}/${BOOT_IMAGE_NAME}" ]; then
|
|
|
d4a4eb |
#if /boot is not a separate partition BOOT_IMAGE might start with /boot
|
|
|
d4a4eb |
BOOT_IMAGE_PATH=${BOOT_IMAGE_PATH#"/boot"}
|
|
|
d4a4eb |
#on some achitectures BOOT_IMAGE does not contain path to kernel
|
|
|
d4a4eb |
|