]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cve-check-tool: correctly exported web proxies
authorKonstantin Shemyak <konstantin.shemyak@ge.com>
Mon, 19 Feb 2018 14:35:54 +0000 (16:35 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 24 Feb 2018 10:31:35 +0000 (10:31 +0000)
The binary 'cve-check-update' downloads the CVE database from the Internet.
If the system is behind a web proxy, the download fails, as proxy-related
variables are not exported.
In turn, 'cve-check-tool' does not connect to the network and correspondingly
does not need exported proxies.

Exported all proxy-related environment variables to 'cve-check-update' and
removed the unneeded export from 'cve-check-tool'.

Signed-off-by: Konstantin Shemyak <konstantin.shemyak@ge.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/cve-check.bbclass
meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb

index d8087dd7c6816ffcb635cbe50a3bebd983d3e90c..537659df12f6ee6dee475499b6374182dae4f89c 100644 (file)
@@ -184,9 +184,6 @@ def check_cves(d, patched_cves):
         bb.note("Recipe has been whitelisted, skipping check")
         return ([], [])
 
-    # It is needed to export the proxies to download the database using HTTP
-    bb.utils.export_proxies(d)
-
     try:
         # Write the faux CSV file to be used with cve-check-tool
         fd, faux = tempfile.mkstemp(prefix="cve-faux-")
index 7b70daa323d8a9d17e4d8344ced9a0cd6a255293..1c84fb1cf2d24b04ad855ef65f002e3e2f777e9e 100644 (file)
@@ -41,6 +41,7 @@ do_populate_cve_db() {
     [ -z "${cve_dir}" ] && cve_dir="${DL_DIR}/CVE_CHECK"
     [ -z "${cve_file}" ] && cve_file="${TMPDIR}/cve_check"
 
+    unused="${@bb.utils.export_proxies(d)}"
     bbdebug 2 "Updating cve-check-tool database located in $cve_dir"
     # --cacert works around curl-native not finding the CA bundle
     if cve-check-update --cacert ${sysconfdir}/ssl/certs/ca-certificates.crt -d "$cve_dir" ; then