mirror of
https://git.code.sf.net/p/linux-ima/ima-evm-utils
synced 2025-04-28 14:43:37 +02:00
ima-evm-utils: tests: fix finding the "boot_aggregate" value
Searching for the last "boot_aggregate" record in the measurement list could inadvertently match a filename containing the string "boot_aggregate". Prevent this from happening. Reviewed-by: Bruno Meneguele <bmeneg@redhat.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
parent
48cb564567
commit
89eee0f883
@ -121,7 +121,7 @@ check() {
|
|||||||
if [ "$VERBOSE" != "0" ]; then
|
if [ "$VERBOSE" != "0" ]; then
|
||||||
echo "$hash"
|
echo "$hash"
|
||||||
fi
|
fi
|
||||||
if grep -e "boot_aggregate$" -e "boot_aggregate.$" "${ASCII_RUNTIME_MEASUREMENTS}" | tail -n 1 | grep -q "${hash}"; then
|
if grep -e " boot_aggregate$" -e " boot_aggregate.$" "${ASCII_RUNTIME_MEASUREMENTS}" | tail -n 1 | grep -q "${hash}"; then
|
||||||
echo "${GREEN}SUCCESS: boot_aggregate ${hash} found${NORM}"
|
echo "${GREEN}SUCCESS: boot_aggregate ${hash} found${NORM}"
|
||||||
return "$OK"
|
return "$OK"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user