summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2020-06-03 02:34:26 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2020-06-03 06:43:14 -0500
commit9ec2a99d6c4670faab2c062fd9a3b9c09f3f3561 (patch)
tree4027125de52d4092e0f54aca1d943ae695e7fbfd
parent823a7b1e4788484e020abb3cfe8b6fd285fd1716 (diff)
downloadsmartcardauth-9ec2a99d.tar.gz
smartcardauth-9ec2a99d.zip
Fix random pool stat detection on new Linux kernels
Make sure the udev shared library is available in the initramfs environment Signed-off-by: Timothy Pearson <kb9vqf@pearsoncomputing.net>
-rwxr-xr-xusr/bin/cryptosmartcard.sh7
-rwxr-xr-xusr/share/initramfs-tools/hooks/cryptlukssc10
2 files changed, 17 insertions, 0 deletions
diff --git a/usr/bin/cryptosmartcard.sh b/usr/bin/cryptosmartcard.sh
index 75d9251..c6cd7fc 100755
--- a/usr/bin/cryptosmartcard.sh
+++ b/usr/bin/cryptosmartcard.sh
@@ -24,6 +24,9 @@
#
# Updated by Timothy Pearson <kb9vqf@pearsoncomputing.net> 6/02/2020
# Use central variable for PKCS library location
+#
+# Updated by Timothy Pearson <kb9vqf@pearsoncomputing.net> 6/03/2020
+# Fix random pool start detection on new kernels
# define counter-intuitive shell logic values (based on /bin/true & /bin/false)
TRUE=0
@@ -129,6 +132,10 @@ if [ $LUKS_KEY_COUNT -gt 0 ]; then
# for enough random data to start PKCS11.
dmesg | grep -q "random: nonblocking pool is initialized" &> /dev/null
RET=$?
+ if [ $RET -ne 0 ]; then
+ dmesg | grep -q "random: fast init done" &> /dev/null
+ RET=$?
+ fi
LOOPS=0
if [ $RET -ne 0 ]; then
msg "Waiting for nonblocking random pool to start..."
diff --git a/usr/share/initramfs-tools/hooks/cryptlukssc b/usr/share/initramfs-tools/hooks/cryptlukssc
index b44b5e1..6665c73 100755
--- a/usr/share/initramfs-tools/hooks/cryptlukssc
+++ b/usr/share/initramfs-tools/hooks/cryptlukssc
@@ -62,6 +62,16 @@ else
cp -L /lib/libpcsclite.so.1 ${DESTDIR}/lib
fi
+if [ -e /lib/*${ARCHDIR}*/libudev.so.1 ]
+then
+ cp -L /lib/*${ARCHDIR}*/libudev.so.1 ${DESTDIR}/lib
+elif [ -e /usr/lib/*${ARCHDIR}*/libudev.so.1 ]
+then
+ cp -L /usr/lib/*${ARCHDIR}*/libudev.so.1 ${DESTDIR}/lib
+else
+ cp -L /lib/libudev.so.1 ${DESTDIR}/lib
+fi
+
if [ -e /usr/lib/*${ARCHDIR}*/libusb-1.0.so.0 ]
then
cp -L /usr/lib/*${ARCHDIR}*/libusb-1.0.so.0 ${DESTDIR}/usr/lib