Merge pull request #335 from lnykryn/BOOT_IMAGE-to-HMAC
01fips: Fix creating path to .hmac of kernel based on BOOT_IMAGEmaster
commit
43634c2469
|
|
@ -110,13 +110,19 @@ do_fips()
|
|||
do_rhevh_check /run/initramfs/live/isolinux/vmlinuz0 || return 1
|
||||
else
|
||||
BOOT_IMAGE="$(getarg BOOT_IMAGE)"
|
||||
[ -e "/boot/.${BOOT_IMAGE}.hmac" ] || BOOT_IMAGE="vmlinuz-${KERNEL}"
|
||||
if ! [ -e "/boot/${BOOT_IMAGE}" ]; then
|
||||
#if /boot is not a separate partition BOOT_IMAGE might start with /boot
|
||||
BOOT_IMAGE=${BOOT_IMAGE#"/boot"}
|
||||
[ -e "/boot/${BOOT_IMAGE}" ] || BOOT_IMAGE="vmlinuz-${KERNEL}"
|
||||
fi
|
||||
|
||||
if ! [ -e "/boot/.${BOOT_IMAGE}.hmac" ]; then
|
||||
warn "/boot/.${BOOT_IMAGE}.hmac does not exist"
|
||||
BOOT_IMAGE_HMAC="/boot/${BOOT_IMAGE%/*}/.${BOOT_IMAGE##*/}.hmac"
|
||||
|
||||
if ! [ -e "${BOOT_IMAGE_HMAC}" ]; then
|
||||
warn "${BOOT_IMAGE_HMAC} does not exist"
|
||||
return 1
|
||||
fi
|
||||
sha512hmac -c "/boot/.${BOOT_IMAGE}.hmac" || return 1
|
||||
sha512hmac -c "${BOOT_IMAGE_HMAC}" || return 1
|
||||
fi
|
||||
|
||||
info "All initrd crypto checks done"
|
||||
|
|
|
|||
Loading…
Reference in New Issue