dracut/SOURCES/0198.patch

35 lines
1.3 KiB
Diff

From c99f396a5d456520b34c60f43c589ca39a301955 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Renaud=20M=C3=A9trich?= <rmetrich@redhat.com>
Date: Wed, 14 Nov 2018 13:19:27 +0100
Subject: [PATCH] fips: removed false-positive 'FATAL: Module xxx not found'
error message when kernel provides a generic algo for module
Resolves: rhbz#1996019
---
modules.d/01fips/fips.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
index 03da6861..1d57a889 100755
--- a/modules.d/01fips/fips.sh
+++ b/modules.d/01fips/fips.sh
@@ -77,7 +77,7 @@ fips_load_crypto()
mv /etc/modprobe.d/fips.conf /etc/modprobe.d/fips.conf.bak
for _module in $FIPSMODULES; do
if [ "$_module" != "tcrypt" ]; then
- if ! modprobe "${_module}"; then
+ if ! modprobe "${_module}" 2>/tmp/fips.modprobe_err; then
# check if kernel provides generic algo
_found=0
while read _k _s _v || [ -n "$_k" ]; do
@@ -86,7 +86,7 @@ fips_load_crypto()
_found=1
break
done </proc/crypto
- [ "$_found" = "0" ] && return 1
+ [ "$_found" = "0" ] && cat /tmp/fips.modprobe_err >&2 && return 1
fi
fi
done