]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fips: use /lib/modules/$(uname -r)/modules.fips
authorHarald Hoyer <harald@redhat.com>
Thu, 21 Jul 2016 13:07:52 +0000 (15:07 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 21 Jul 2016 13:07:52 +0000 (15:07 +0200)
if /lib/modules/$(uname -r)/modules.fips exists, use that list instead
of the dracut module list.

modules.d/01fips/module-setup.sh

index 77ed24efcdeebc5d6e837b7860d67378805c545b..e1296d75db1522b57eb4586012017f08ecf7cefd 100755 (executable)
@@ -12,12 +12,17 @@ depends() {
 
 installkernel() {
     local _fipsmodules _mod
-    _fipsmodules="aead aes_generic aes-x86_64 ansi_cprng arc4 blowfish camellia cast6 cbc ccm "
-    _fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod drbg "
-    _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 "
-    _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic "
-    _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390"
-    _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib"
+
+    if [[ -f "${srcmods}/modules.fips" ]]; then
+        _fipsmodules="$(cat "${srcmods}/modules.fips")"
+    else
+        _fipsmodules="aead aes_generic aes-x86_64 ansi_cprng arc4 blowfish camellia cast6 cbc ccm "
+        _fipsmodules+="chainiv crc32c crct10dif_generic cryptomgr crypto_null ctr cts deflate des des3_ede dm-crypt dm-mod drbg "
+        _fipsmodules+="ecb eseqiv fcrypt gcm ghash_generic hmac khazad lzo md4 md5 michael_mic rmd128 "
+        _fipsmodules+="rmd160 rmd256 rmd320 rot13 salsa20 seed seqiv serpent sha1 sha224 sha256 sha256_generic "
+        _fipsmodules+="aes_s390 des_s390 prng sha256_s390 sha_common des_check_key sha1_s390 sha512_s390"
+        _fipsmodules+="sha384 sha512 sha512_generic tcrypt tea tnepres twofish wp256 wp384 wp512 xeta xtea xts zlib"
+    fi
 
     mkdir -m 0755 -p "${initdir}/etc/modprobe.d"