summaryrefslogtreecommitdiffstats
path: root/bin/update-nvd
diff options
context:
space:
mode:
authorFlorian Weimer <fw@deneb.enyo.de>2005-12-17 11:17:21 +0000
committerFlorian Weimer <fw@deneb.enyo.de>2005-12-17 11:17:21 +0000
commit1ac2fcdaef4e9b499886038f25f134e9e0643832 (patch)
tree1d52019a1e69c3856f59d97d0369abca0bfa2998 /bin/update-nvd
parent88813126672605c4c361e9575891de05a41a2e14 (diff)
Store CVE descriptions in the nvd_data table. Enable incremental
NVD updates. lib/python/security_db.py (DB): Bump schema version. Add cve_desc column to the nvd_data table. (DB.updateNVD): New method. bin/update-nvd: If the -i option is specified, use updateNVD instead of replaceNVD. lib/python/nvd.py (_Parser): Add new member variable path. (_Parser.characters): New method. (_Parser.endElement): Store cve_desc variable. bin/tracker_service.py (TrackerService.page_bug): Use NVD description if available. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@3078 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/update-nvd')
-rw-r--r--bin/update-nvd9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/update-nvd b/bin/update-nvd
index 4910845ef9..88fe39450b 100644
--- a/bin/update-nvd
+++ b/bin/update-nvd
@@ -24,12 +24,19 @@ import security_db
db_file = 'data/security.db'
db = security_db.DB(db_file)
+incremental = False
data = []
for name in sys.argv[1:]:
+ if name == '-i':
+ incremental = True
+ continue
f = file(name)
data += nvd.parse(f)
f.close()
cursor = db.writeTxn()
-db.replaceNVD(cursor, data)
+if incremental:
+ db.updateNVD(cursor, data)
+else:
+ db.replaceNVD(cursor, data)
db.commit(cursor)

© 2014-2024 Faster IT GmbH | imprint | privacy policy