mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-04 16:10:04 +00:00
cve-check: get_cve_info should open the database read-only
All of the function in cve-check should open the database read-only, as the only writer is the fetch task in cve-update-db. However, get_cve_info() was failing to do this, which might be causing locking issues with sqlite. (From OE-Core rev: 3c79237085169b96cc56910b08263437cad09e4d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8de517238f1f418d9af1ce312d99de04ce2e26fc) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
5eaa4463f1
commit
16b4a5c2cb
|
|
@ -265,7 +265,8 @@ def get_cve_info(d, cves):
|
|||
import sqlite3
|
||||
|
||||
cve_data = {}
|
||||
conn = sqlite3.connect(d.getVar("CVE_CHECK_DB_FILE"))
|
||||
db_file = d.expand("file:${CVE_CHECK_DB_FILE}?mode=ro")
|
||||
conn = sqlite3.connect(db_file, uri=True)
|
||||
|
||||
for cve in cves:
|
||||
for row in conn.execute("SELECT * FROM NVD WHERE ID IS ?", (cve,)):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user