This repository was archived by the owner on Sep 18, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Expand file tree Collapse file tree 2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 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" )
6+
7+ 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 "
19+ return 1
20+ fi
21+
22+ return 0
23+ }
24+
525test_image_content () {
626 local root=" $1 "
727 local returncode=0
@@ -45,5 +65,9 @@ test_image_content() {
4565 # returncode=1
4666 fi
4767
68+ if ! glsa_image; then
69+ returncode=1
70+ fi
71+
4872 return $returncode
4973}
Original file line number Diff line number Diff line change @@ -80,7 +80,8 @@ exec sudo -E ${command} ${extra_args} "\$@"
8080EOF
8181 # Note: parent will process these.
8282 wrappers+=( " ${target} " )
83- eval ${command^^} _WRAPPER=" ${target} " # ${foo^^} returns toupper($foo)
83+ upper=${command^^}
84+ eval ${upper/ -/ _} _WRAPPER=" ${target} " # ${foo^^} returns toupper($foo)
8485}
8586
8687generate_all_wrappers () {
@@ -90,7 +91,7 @@ generate_all_wrappers() {
9091 info " Generating wrapper scripts"
9192
9293 for wrapper in ' emerge --root-deps' ebuild eclean equery portageq \
93- qcheck qfile qlist emaint; do
94+ qcheck qfile qlist emaint glsa-check ; do
9495 _generate_wrapper ${wrapper}
9596 done
9697
You can’t perform that action at this time.
0 commit comments