summaryrefslogtreecommitdiffstats
path: root/data/DTSA/dtsa
diff options
context:
space:
mode:
authorMoritz Muehlenhoff <jmm@debian.org>2005-09-07 11:37:50 +0000
committerMoritz Muehlenhoff <jmm@debian.org>2005-09-07 11:37:50 +0000
commit5ccccd9f0e4bd7096b30e24d010dbc704c8c6051 (patch)
tree7b9e339e6e788558fb729270258a4739a61460f3 /data/DTSA/dtsa
parent2110627632755560401bc27ccb8ac4051563a1b5 (diff)
Added support for issueing updated DTSAs to the dtsa script.
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@1833 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'data/DTSA/dtsa')
-rwxr-xr-xdata/DTSA/dtsa21
1 files changed, 14 insertions, 7 deletions
diff --git a/data/DTSA/dtsa b/data/DTSA/dtsa
index 082b744423..bb8ef7143e 100755
--- a/data/DTSA/dtsa
+++ b/data/DTSA/dtsa
@@ -17,12 +17,12 @@ announce_mail_address = "secure-testing-announce@lists.alioth.debian.org"
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 @@ def process_dtsa(id):
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 @@ def yn(v):
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 @@ if len(opts) != 1:
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)
+

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