diff -Nru apache2-2.4.7/debian/changelog apache2-2.4.7/debian/changelog --- apache2-2.4.7/debian/changelog 2014-03-20 12:34:34.000000000 +0000 +++ apache2-2.4.7/debian/changelog 2014-04-03 11:22:40.000000000 +0000 @@ -1,3 +1,10 @@ +apache2 (2.4.7-1ubuntu4) trusty; urgency=medium + + * d/p/split-logfile.patch: fix completely broken split-logfile command + (LP: #1299162). Thanks to Holger Mauermann. + + -- Robie Basak Thu, 03 Apr 2014 11:21:22 +0000 + apache2 (2.4.7-1ubuntu3) trusty; urgency=medium * SECURITY UPDATE: denial of service via mod_dav incorrect end of string diff -Nru apache2-2.4.7/debian/patches/series apache2-2.4.7/debian/patches/series --- apache2-2.4.7/debian/patches/series 2014-03-20 12:34:06.000000000 +0000 +++ apache2-2.4.7/debian/patches/series 2014-04-03 11:17:48.000000000 +0000 @@ -10,3 +10,4 @@ ignore-quilt-dir CVE-2013-6438.patch CVE-2014-0098.patch +split-logfile.patch diff -Nru apache2-2.4.7/debian/patches/split-logfile.patch apache2-2.4.7/debian/patches/split-logfile.patch --- apache2-2.4.7/debian/patches/split-logfile.patch 1970-01-01 00:00:00.000000000 +0000 +++ apache2-2.4.7/debian/patches/split-logfile.patch 2014-04-03 11:21:09.000000000 +0000 @@ -0,0 +1,39 @@ +Description: fix completely broken split-logfile command +Author: Holger Mauermann +Bug: https://issues.apache.org/bugzilla/show_bug.cgi?id=56329 +Bug-Ubuntu: https://launchpad.net/bugs/1299162 +Reviewed-by: Robie Basak +Last-Update: 2014-04-03 + +--- a/support/split-logfile.in 2014-02-13 13:11:33.000000000 +0100 ++++ b/support/split-logfile.in 2014-03-28 20:27:59.600942795 +0100 +@@ -29,7 +29,7 @@ + use strict; + use warnings; + +-my %is_open = (); ++my %log_file = (); + + while (my $log_line = ) { + # +@@ -54,10 +54,9 @@ + # If the log file for this virtual host isn't opened + # yet, do it now. + # +- if (! $is_open{$vhost}) { +- open $vhost, ">>${vhost}.log" ++ if (! $log_file{$vhost}) { ++ open $log_file{$vhost}, ">>${vhost}.log" + or die ("Can't open ${vhost}.log"); +- $is_open{$vhost} = 1; + } + # + # Strip off the first token (which may be null in the +@@ -65,6 +64,6 @@ + # record to the current log file. + # + $log_line =~ s/^\S*\s+//; +- printf $vhost "%s", $log_line; ++ print {$log_file{$vhost}} $log_line; + } + exit 0;