fips: removed false-positive 'FATAL: Module xxx not found' error message when kernel provides a generic algo for module

Signed-off-by: Renaud Métrich <rmetrich@redhat.com>
master
Renaud Métrich 2018-11-14 13:19:27 +01:00 committed by Harald Hoyer
parent 05dc158e3c
commit 01ffcf342a
1 changed files with 2 additions and 2 deletions

View File

@ -84,7 +84,7 @@ do_fips()
mv /etc/modprobe.d/fips.conf /etc/modprobe.d/fips.conf.bak mv /etc/modprobe.d/fips.conf /etc/modprobe.d/fips.conf.bak
for _module in $FIPSMODULES; do for _module in $FIPSMODULES; do
if [ "$_module" != "tcrypt" ]; then if [ "$_module" != "tcrypt" ]; then
if ! modprobe "${_module}"; then if ! modprobe "${_module}" 2>/tmp/fips.modprobe_err; then
# check if kernel provides generic algo # check if kernel provides generic algo
_found=0 _found=0
while read _k _s _v || [ -n "$_k" ]; do while read _k _s _v || [ -n "$_k" ]; do
@ -93,7 +93,7 @@ do_fips()
_found=1 _found=1
break break
done </proc/crypto done </proc/crypto
[ "$_found" = "0" ] && return 1 [ "$_found" = "0" ] && cat /tmp/fips.modprobe_err >&2 && return 1
fi fi
fi fi
done done