]> 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)
committerSteve Sakoman <steve@sakoman.com>
Fri, 20 Jan 2023 18:03:12 +0000 (08:03 -1000)
commit6a219c50ee12b7fb584e2db3e4dde171903acfb7
tree030a21dd355e1aab6395f446cd1e81c33e60dd96
parent60fa8135437ab1e2bc7cead5f838ac787c8dab26
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>
(cherry picked from commit 8efe99214d8b005f0ecac690ce5ba17b31758f92)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-core/meta/cve-update-db-native.bb