diff options
Diffstat (limited to '')
-rwxr-xr-x | modules.d/01fips/fips.sh | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh index c81c2a6..2c7b2e3 100755 --- a/modules.d/01fips/fips.sh +++ b/modules.d/01fips/fips.sh @@ -94,16 +94,14 @@ fips_load_crypto() { local _module local _found - read -d '' -r FIPSMODULES < /etc/fipsmodules - fips_info "Loading and integrity checking all crypto modules" - for _module in $FIPSMODULES; do + while read -r _module; do if [ "$_module" != "tcrypt" ]; then if ! nonfatal_modprobe "${_module}" 2> /tmp/fips.modprobe_err; then # check if kernel provides generic algo _found=0 while read -r _k _ _v || [ -n "$_k" ]; do - [ "$_k" != "name" -a "$_k" != "driver" ] && continue + [ "$_k" != "name" ] && [ "$_k" != "driver" ] && continue [ "$_v" != "$_module" ] && continue _found=1 break @@ -111,7 +109,7 @@ fips_load_crypto() { [ "$_found" = "0" ] && cat /tmp/fips.modprobe_err >&2 && return 1 fi fi - done + done < /etc/fipsmodules if [ -f /etc/fips.conf ]; then mkdir -p /run/modprobe.d cp /etc/fips.conf /run/modprobe.d/fips.conf |