* [PATCH] ima-evm-utils: tests: fix finding the "boot_aggregate" value
@ 2020-06-24 2:10 Mimi Zohar
2020-06-24 21:52 ` Bruno Meneguele
0 siblings, 1 reply; 2+ messages in thread
From: Mimi Zohar @ 2020-06-24 2:10 UTC (permalink / raw)
To: linux-integrity; +Cc: Mimi Zohar, Petr Vorel, Maurizio Drocco, Bruno Meneguele
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.
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
---
tests/boot_aggregate.test | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/boot_aggregate.test b/tests/boot_aggregate.test
index 3e961ce5f9aa..fe0c9aa1898e 100755
--- a/tests/boot_aggregate.test
+++ b/tests/boot_aggregate.test
@@ -121,7 +121,7 @@ check() {
if [ "$VERBOSE" != "0" ]; then
echo "$hash"
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}"
return "$OK"
fi
--
2.7.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ima-evm-utils: tests: fix finding the "boot_aggregate" value
2020-06-24 2:10 [PATCH] ima-evm-utils: tests: fix finding the "boot_aggregate" value Mimi Zohar
@ 2020-06-24 21:52 ` Bruno Meneguele
0 siblings, 0 replies; 2+ messages in thread
From: Bruno Meneguele @ 2020-06-24 21:52 UTC (permalink / raw)
To: Mimi Zohar; +Cc: linux-integrity, Petr Vorel, Maurizio Drocco
[-- Attachment #1: Type: text/plain, Size: 1273 bytes --]
On Tue, Jun 23, 2020 at 10:10:52PM -0400, Mimi Zohar wrote:
> 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.
>
> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
> ---
> tests/boot_aggregate.test | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/boot_aggregate.test b/tests/boot_aggregate.test
> index 3e961ce5f9aa..fe0c9aa1898e 100755
> --- a/tests/boot_aggregate.test
> +++ b/tests/boot_aggregate.test
> @@ -121,7 +121,7 @@ check() {
> if [ "$VERBOSE" != "0" ]; then
> echo "$hash"
> 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}"
> return "$OK"
> fi
> --
> 2.7.5
>
Considering whitespaces in between file name words are translated to "_"
(underscore) in measurement file:
Reviewed-by: Bruno Meneguele <bmeneg@redhat.com>
--
bmeneg
PGP Key: http://bmeneg.com/pubkey.txt
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-24 21:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24 2:10 [PATCH] ima-evm-utils: tests: fix finding the "boot_aggregate" value Mimi Zohar
2020-06-24 21:52 ` Bruno Meneguele
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).