]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
cve-update-db-native: avoid incomplete updates
authorMarta Rybczynska <rybczynska@gmail.com>
Tue, 3 Jan 2023 14:03:59 +0000 (15:03 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 6 Jan 2023 12:03:31 +0000 (12:03 +0000)
commit8efe99214d8b005f0ecac690ce5ba17b31758f92
tree6cbd1d14de313a9dbfbaee88dd5d52ac613c5a1e
parentbd22b705366e41ebd5eba4ce31d5654fc631a1f5
cve-update-db-native: avoid incomplete updates

The database update has been done on the original file. In case of
network connection issues, temporary outage of the NVD server or
a similar situation, the function could exit with incomplete data
in the database. This patch solves the issue by performing the update
on a copy of the database. It replaces the main one only if the whole
update was successful.

See https://bugzilla.yoctoproject.org/show_bug.cgi?id=14929

Reported-by: Alberto Pianon <alberto@pianon.eu>
Signed-off-by: Marta Rybczynska <marta.rybczynska@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/meta/cve-update-db-native.bb