|
|
fab351 |
From 14310ca42f06c2156ab5cefd05dbaa47ae3b054d Mon Sep 17 00:00:00 2001
|
|
|
fab351 |
From: Jonathan Lebon <jonathan@jlebon.com>
|
|
|
fab351 |
Date: Tue, 29 Oct 2019 16:47:34 -0400
|
|
|
fab351 |
Subject: [PATCH] 01fips: run sha512hmac from directory HMAC file directory
|
|
|
fab351 |
|
|
|
fab351 |
That way, the HMAC file can contain a relative path instead of an
|
|
|
fab351 |
absolute one. The issue is that right now the kernel RPM bakes the
|
|
|
fab351 |
`/boot/vmlinuz-${kver}` path into the HMAC file which poses an issue for
|
|
|
fab351 |
rpm-ostree systems (and any other system where the kernel isn't simply
|
|
|
fab351 |
in the top-level `/boot`.
|
|
|
fab351 |
|
|
|
fab351 |
For now, we're hacking around this in rpm-ostree:
|
|
|
fab351 |
https://github.com/coreos/rpm-ostree/pull/1934
|
|
|
fab351 |
|
|
|
fab351 |
Though I'd like to propose the same change in the kernel spec file.
|
|
|
fab351 |
---
|
|
|
fab351 |
modules.d/01fips/fips.sh | 2 +-
|
|
|
fab351 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
fab351 |
|
|
|
fab351 |
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
|
|
|
fab351 |
index c3dbcf74..893143d0 100755
|
|
|
fab351 |
--- a/modules.d/01fips/fips.sh
|
|
|
fab351 |
+++ b/modules.d/01fips/fips.sh
|
|
|
fab351 |
@@ -135,7 +135,7 @@ do_fips()
|
|
|
fab351 |
return 1
|
|
|
fab351 |
fi
|
|
|
fab351 |
|
|
|
fab351 |
- sha512hmac -c "${BOOT_IMAGE_HMAC}" || return 1
|
|
|
fab351 |
+ (cd "${BOOT_IMAGE_HMAC%/*}" && sha512hmac -c "${BOOT_IMAGE_HMAC}") || return 1
|
|
|
fab351 |
fi
|
|
|
fab351 |
|
|
|
fab351 |
info "All initrd crypto checks done"
|
|
|
fab351 |
|