[Secure-testing-commits] r1279 - in data: . CAN

Joey Hess joeyh@costa.debian.org
Mon, 27 Jun 2005 20:15:43 +0000


Author: joeyh
Date: 2005-06-27 20:15:40 +0000 (Mon, 27 Jun 2005)
New Revision: 1279

Modified:
   data/CAN/list
   data/checklist
Log:
add --output switch


Modified: data/CAN/list
===================================================================
--- data/CAN/list	2005-06-27 20:07:10 UTC (rev 1278)
+++ data/CAN/list	2005-06-27 20:15:40 UTC (rev 1279)
@@ -2636,7 +2636,7 @@
 	NOTE: In Debian this is only part of the examples in share/doc, any admin will
 	NOTE: have to modify it for his purposes anyway, so there's no security problem
 CAN-2005-1391 (Buffer overflow in the add_port function in APSIS Pound 1.8.2 and ...)
-	- pound (unfixed; bug #307852; medium)
+	- pound 1.8.2-1.1 (bug #307852; medium)
 CAN-2005-1390
 	NOTE: rejected
 CAN-2005-1389

Modified: data/checklist
===================================================================
--- data/checklist	2005-06-27 20:07:10 UTC (rev 1278)
+++ data/checklist	2005-06-27 20:15:40 UTC (rev 1279)
@@ -9,10 +9,39 @@
 
 my $html=0;
 my $suite="testing";
-if (! GetOptions("html" => \$html, "suite=s" => \$suite) || ! @ARGV) {
-	die "usage: $0 [--suite suite] [--html] list ...\n";
+my $output;
+if (! GetOptions(
+		"html" => \$html,
+		"suite=s" => \$suite,
+		"output=s", \$output)
+    || ! @ARGV) {
+	die "usage: $0 [--suite suite] [--html] [--output=file] list ...\n";
 }
 
+if (defined $output) {
+	open (OUT, ">$output.tmp.$$") || die "output.tmp.$$: $!";
+}
+else {
+	open (OUT, ">&STDOUT");
+}
+
+if ($html) {
+	print OUT "<html><title>$suite security issues</title>\n";
+	if ($suite ne 'testing' && $suite ne 'unstable') {
+		print OUT <<"EOF";
+<p>
+<em>Warning:</em> This page is the result of running the testing security
+check script against the $suite distribution. As data is only gathered for
+the testing distribution, results may be innecurate if a package has
+changed its name, if a vulnerability affects $suite and not testing, or if a
+vulnerability has been fixed in $suite by the $suite security team.
+</p>
+EOF
+	}
+	print OUT "<ul>\n";
+}
+
+
 my %data;
 my %needkernel=qw/2.4.27 0 2.6.11 0/;
 my $list_unknown=1; #set to 1 to display kernel images with unknown source version
@@ -140,42 +169,26 @@
 }
 
 
-if ($html) {
-	print "<html><title>$suite security issues</title>\n";
-	if ($suite ne 'testing' && $suite ne 'unstable') {
-		print <<"EOF";
-<p>
-<em>Warning:</em> This page is the result of running the testing security
-check script against the $suite distribution. As data is only gathered for
-the testing distribution, results may be innecurate if a package has
-changed its name, if a vulnerability affects $suite and not testing, or if a
-vulnerability has been fixed in $suite by the $suite security team.
-</p>
-EOF
-	}
-	print "<ul>\n";
-}
-
 foreach my $package (sort keys %data) {
 	foreach my $condition (sort keys %{$data{$package}}) {
-		print "<li>" if $html;
-		print "$package $condition for ";
+		print OUT "<li>" if $html;
+		print OUT "$package $condition for ";
 		my $items=0;
 		foreach my $i (sort @{$data{$package}{$condition}}) {
-			print ", " if $items > 0;
+			print OUT ", " if $items > 0;
 			
 			if ($html) {
 				my $color=$colormap{$i->{urgency}};
-				print "<span style=\"background:$color\">";
+				print OUT "<span style=\"background:$color\">";
 			}
-			print $i->{item};
+			print OUT $i->{item};
 			if ($html) {
-				print "</span>";
+				print OUT "</span>";
 			}
 			
 			$items++;
 		}
-		print "\n";
+		print OUT "\n";
 	}
 }
 
@@ -217,11 +230,11 @@
 
 	foreach $package (sort keys %images) {
 		if ($images{$package} eq "0") {
-			print "<li>" if ($html && $list_unknown);
-			print "$package built from kernel-source-$version $needkernel{$version} needed, current version unknown\n" if $list_unknown;
+			print OUT "<li>" if ($html && $list_unknown);
+			print OUT "$package built from kernel-source-$version $needkernel{$version} needed, current version unknown\n" if $list_unknown;
 		} elsif (!system("dpkg --compare-versions $needkernel{$version} gt $images{$package}")) {
-		print "<li>" if $html;
-			print "$package built from kernel-source-$version $needkernel{$version} needed, have $images{$package}\n";
+		print OUT "<li>" if $html;
+			print OUT "$package built from kernel-source-$version $needkernel{$version} needed, have $images{$package}\n";
 			$need_rebuild++;
 		}
 	}
@@ -231,17 +244,22 @@
 
 
 if ($html) {
-	print "</ul>\n";
-	print "<hr>\n";
-	print "Total holes unfixed: $unfixed<br>\n";
-	print "Total holes fixed in unstable but not $suite: $unprop_all";
+	print OUT "</ul>\n";
+	print OUT "<hr>\n";
+	print OUT "Total holes unfixed: $unfixed<br>\n";
+	print OUT "Total holes fixed in unstable but not $suite: $unprop_all";
 	if ($unprop_all != $unprop) {
-		print " (+".($unprop - $unprop_all)." on some arches)";
+		print OUT " (+".($unprop - $unprop_all)." on some arches)";
 	}
-	print "<br>\n";
-	print "Total number of kernel image packages not up to date: $need_rebuild<br>\n";
-	print "Number of TODO lines in <a href=\"http://svn.debian.org/wsvn/secure-testing/data/?rev=0&sc=0\">records</a>: $todos<br>\n";
-	print "Maintained by the <a href=\"http://secure-testing.alioth.debian.org/\">testing security team</a><br>\n";
-	print "Last update: ".`date`."<br>\n";
-	print "</html>\n";
+	print OUT "<br>\n";
+	print OUT "Total number of kernel image packages not up to date: $need_rebuild<br>\n";
+	print OUT "Number of TODO lines in <a href=\"http://svn.debian.org/wsvn/secure-testing/data/?rev=0&sc=0\">records</a>: $todos<br>\n";
+	print OUT "Maintained by the <a href=\"http://secure-testing.alioth.debian.org/\">testing security team</a><br>\n";
+	print OUT "Last update: ".`date`."<br>\n";
+	print OUT "</html>\n";
 }
+
+close OUT;
+if (defined $output) {
+	rename("$output.tmp.$$", $output) || die "rename: $!";
+}