[meta-security][PATCH 1/2] tpm2-abrmd-init.sh: fix for /dev/tpmrmX


Diego Santa Cruz
 

From: Trevor Woerner <twoerner@...>

Newer kernels, in addition to the traditional /dev/tpmX device nodes, are now
also creating /dev/tpmrmX device nodes. This causes this script to get
confused and abort, meaning tpm2-abrmd does not get started during boot.

Fix for https://github.com/flihp/meta-measured/issues/56

Signed-off-by: Trevor Woerner <twoerner@...>
Signed-off-by: Diego Santa Cruz <Diego.SantaCruz@...>
---
meta-tpm/recipes-tpm2/tpm2-abrmd/files/tpm2-abrmd-init.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-tpm/recipes-tpm2/tpm2-abrmd/files/tpm2-abrmd-init.sh b/meta-tpm/recipes-tpm2/tpm2-abrmd/files/tpm2-abrmd-init.sh
index c8dfb7d..9bb7da9 100644
--- a/meta-tpm/recipes-tpm2/tpm2-abrmd/files/tpm2-abrmd-init.sh
+++ b/meta-tpm/recipes-tpm2/tpm2-abrmd/files/tpm2-abrmd-init.sh
@@ -27,7 +27,7 @@ case "${1}" in
start)
echo -n "Starting $DESC: "

- if [ ! -e /dev/tpm* ]
+ if [ ! -e /dev/tpm? ]
then
echo "device driver not loaded, skipping."
exit 0
--
2.18.1

Join yocto@lists.yoctoproject.org to automatically receive all group messages.