[Secure-testing-commits] r1833 - data/DTSA
Moritz Muehlenhoff
jmm-guest at costa.debian.org
Wed Sep 7 11:37:51 UTC 2005
Author: jmm-guest
Date: 2005-09-07 11:37:50 +0000 (Wed, 07 Sep 2005)
New Revision: 1833
Modified:
data/DTSA/dtsa
Log:
Added support for issueing updated DTSAs to the dtsa script.
Modified: data/DTSA/dtsa
===================================================================
--- data/DTSA/dtsa 2005-09-07 09:14:18 UTC (rev 1832)
+++ data/DTSA/dtsa 2005-09-07 11:37:50 UTC (rev 1833)
@@ -17,12 +17,12 @@
def print_usage():
print "dtsa [-a | -u] dtsa-id major number"
- print " -p Process a DTSA from a template"
+ print " -p Process a new DTSA from a template"
print " -u Update an existing DTSA from a template"
sys.exit(-1)
-def process_dtsa(id):
+def process_dtsa(id, sid):
filename=glob.glob("advs/" + id + "-*.adv")
src = ""
@@ -38,7 +38,7 @@
scope = ""
debian_specific = False
- dtsa_id = "DTSA-" + id + "-1"
+ dtsa_id = "DTSA-" + id + "-" + str(sid)
t_f = open(filename[0], "r")
t_l = t_f.readlines()
@@ -259,8 +259,14 @@
return "No"
-def update_dtsa():
- pass
+def update_dtsa(id):
+ filename=glob.glob("DTSA-" + id + "*")
+ for i in filename: # prune HTML reports
+ if i.endswith(".html"):
+ filename.remove(i)
+ sub_id = int(filename[-1].split("-")[-1])
+ sub_id += 1
+ process_dtsa(id, sub_id)
opts, pargs = getopt.getopt(sys.argv[1:], "up")
@@ -273,7 +279,8 @@
print_usage()
if opts[0][0] == "-u":
- update_dtsa()
+ update_dtsa(pargs[0].strip())
if opts[0][0] == "-p":
- process_dtsa(pargs[0].strip())
+ process_dtsa(pargs[0].strip(), 1)
+
More information about the Secure-testing-commits
mailing list