Skip to content
This repository was archived by the owner on Sep 18, 2020. It is now read-only.

Commit 20441a8

Browse files
committed
Merge pull request #548 from marineam/glsa
glsa-check: simplify and respect current root being tested
2 parents c7ab74a + c535cd3 commit 20441a8

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

build_library/test_image_content.sh

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,11 @@
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

5-
GLSA_WHITELIST=("201412-09")
5+
GLSA_WHITELIST="201412-09"
66

77
glsa_image() {
8-
VULNS=()
9-
GLSAS=`glsa-check-$BOARD -t all`
10-
for GLSA in $GLSAS; do
11-
if [[ " ${GLSA_WHITELIST[@]} " =~ " ${GLSA} " ]]; then
12-
continue
13-
else
14-
VULNS+=($GLSA)
15-
fi
16-
done
17-
if [[ ${#VULNS[@]} != 0 ]]; then
18-
echo "The following GLSAs apply: $VULNS"
8+
if glsa-check-$BOARD -t all | grep -v "$GLSA_WHITELIST"; then
9+
echo "The above GLSAs apply to $ROOT"
1910
return 1
2011
fi
2112

@@ -65,7 +56,7 @@ test_image_content() {
6556
#returncode=1
6657
fi
6758

68-
if ! glsa_image; then
59+
if ! ROOT="$root" glsa_image; then
6960
returncode=1
7061
fi
7162

0 commit comments

Comments
 (0)