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