Fwd: logwatch patch
"Kirk Bauer" <[email protected]>
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
---------- Forwarded message ---------- From: Rem Isa <[email protected]> Date: Wed, 14 Nov 2007 12:55:03 +0100 Subject: To: [email protected] Hello, a minor patch proposal for logwatch v7.3.2, unified diff format. Enables logwatch to cope with empty compressed logfiles, such as those generated by logrotated. Enjoy, Remi --- logwatch.pl.org 2007-11-14 12:50:50.000000000 +0100 +++ logwatch.pl 2007-11-14 12:51:25.000000000 +0100 @@ -876,7 +876,7 @@ my @FileStat = stat($Archive); if ($CheckTime <= ($FileStat[9])) { - if (($Archive =~ m/gz$/) && (-f "$Archive")) { + if (($Archive =~ m/gz$/) && (-f "$Archive") && (- s "$Archive")) { #Remi 14.11.2007, case of empty compressed archive file. #These system calls are not secure but we are getting closer #What needs to go is all the pipes and instead we need a command loop #For each filter to apply -mgt ----------------------------------------------------------- www.EmailAsso.net : solutions email pour les associations, email gratuit sans pub ni virus. www.lavacheautomatique.com : email gratuit @lavache.com, original et universel. www.MonEmail.com : l'email professionnel à 1Giga, avec agenda partagé et gestion des contacts. Votre bureau vous suit partout. 30 jours d'essai gratuit. -- Kirk Bauer <[email protected]> http://linux.kaybee.org | www.logwatch.org Author, Automating UNIX & Linux Administration