/[secure-testing]/sarge-checks/checklist
ViewVC logotype

Contents of /sarge-checks/checklist

Parent Directory Parent Directory | Revision Log Revision Log


Revision 257 - (hide annotations) (download)
Sun Jan 9 06:16:59 2005 UTC (8 years, 4 months ago) by joeyh
File size: 1775 byte(s)
fix stats
1 joeyh 2 #!/usr/bin/perl
2     # Must run on a machine with madison.
3 joeyh 256 use URI::Escape;
4 joeyh 2
5 joeyh 230 my $html=0;
6     if ($ARGV[0] eq 'html') {
7     shift;
8     $html=1;
9     }
10    
11 joeyh 31 if (! @ARGV) {
12 joeyh 230 die "usage: $0 [html] list\n";
13 joeyh 2 }
14    
15 joeyh 230 if ($html) {
16 joeyh 244 print "<html><title>testing security issues</title>\n";
17 joeyh 230 print "<ul>\n";
18     }
19    
20 joeyh 231 sub formatout {
21     my $out=shift;
22     if ($html) {
23     $out=~s#((?:CAN|CVE)-\d+-\d+)#<a href="http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=$1">$1</a>#g;
24     $out=~s{bug #(\d+)}{<a href="http://bugs.debian.org/$1">bug #$1</a>}g;
25     }
26     return $out;
27 joeyh 230 }
28    
29 joeyh 239 my $unprop = my $unfixed = 0;
30    
31 joeyh 31 foreach my $list (@ARGV) {
32     if (-d $list) {
33     $list="$list/list";
34 joeyh 2 }
35 joeyh 31
36     open (IN, $list) || die "open $list: $!";
37     while (<IN>) {
38     chomp;
39     if (/^\[/) {
40 joeyh 242 ($id)=m/((?:DSA|CAN|CVE)-[^\s]+) /;
41 joeyh 2 }
42 joeyh 242 elsif (/^((?:DSA|CAN|CVE)-[^\s]+)/) {
43     $id=$1;
44 joeyh 31 }
45     elsif (/^\s+[!-]\s+(.*?)\s+(.*)$/) {
46     my $package=$1;
47     my $version=$2;
48 joeyh 241
49     my $maddy=`madison -s testing '$package'`;
50     next unless length $maddy; # skip if not in testing
51    
52 joeyh 31 if ($version=~/unfixed/) {
53 joeyh 231 print "<li>" if $html;
54     print formatout("$package $version for $id\n");
55 joeyh 257 $unfixed++;
56 joeyh 2 }
57 joeyh 241 else {
58 joeyh 31 my @fields = split(/\s*\|\s*/, $maddy);
59 joeyh 230 my $havver=$fields[1];
60     my $cmp=system("dpkg --compare-versions '$havver' '>=' '$version'");
61 joeyh 31 if ($cmp != 0) {
62 joeyh 230 if ($html) {
63     print "<li>";
64 joeyh 256 $havver='<a href="http://bjorn.haxx.se/debian/testing.pl?package='.uri_escape($package).'">'.$havver.'</a>';
65 joeyh 230 }
66 joeyh 231 print formatout("$package $version needed, have $havver for $id\n");
67 joeyh 257 $unprop++;
68 joeyh 31 }
69     }
70 joeyh 2 }
71     }
72     }
73 joeyh 230
74     if ($html) {
75     print "</ul>\n";
76 joeyh 233 print "<hr>\n";
77 joeyh 244 print "Total unfixed: $unfixed<br>\n";
78     print "Total fixed in unstable but not testing: $unprop<br>\n";
79     print "Last update: ".`date`."<br>\n";
80     print "</html>\n";
81 joeyh 230 }

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5