[Pkg-logwatch-general] r47 - in trunk: . contrib contrib/conf contrib/conf/logfiles contrib/conf/services contrib/scripts contrib/scripts/services contrib/scripts/shared debian debian/dist.conf/logfiles debian/dist.conf/services patches

Willi Mann willi-guest at costa.debian.org
Sat Sep 16 20:07:15 UTC 2006


Author: willi-guest
Date: 2006-09-16 20:07:15 +0000 (Sat, 16 Sep 2006)
New Revision: 47

Added:
   trunk/contrib/
   trunk/contrib/README
   trunk/contrib/conf/
   trunk/contrib/conf/logfiles/
   trunk/contrib/conf/logfiles/dpkg.conf
   trunk/contrib/conf/services/
   trunk/contrib/conf/services/dpkg.conf
   trunk/contrib/scripts/
   trunk/contrib/scripts/services/
   trunk/contrib/scripts/services/dpkg
   trunk/contrib/scripts/shared/
   trunk/contrib/scripts/shared/applyeuro2date
Removed:
   trunk/debian/dist.conf/logfiles/fail2ban.conf
   trunk/debian/dist.conf/services/fail2ban.conf
   trunk/patches/00-addfail2ban.diff
   trunk/patches/01-fail2banv2.diff
   trunk/patches/service-smartd.diff
   trunk/patches/z-356815-imapd.diff
Modified:
   trunk/buildversion.sh
   trunk/debian/changelog
   trunk/patches/APPLIED_NEXT_UPSTREAM
Log:
- prepare first test package for 7.3.1, (7.3.1-1~test1)
- add a contrib directory for scripts from external sources
- buildversion.sh now has the ability to set a default version


Modified: trunk/buildversion.sh
===================================================================
--- trunk/buildversion.sh	2006-08-04 18:38:41 UTC (rev 46)
+++ trunk/buildversion.sh	2006-09-16 20:07:15 UTC (rev 47)
@@ -2,8 +2,11 @@
 set -e
 
 VERSION=$1
+if [ -z "$VERSION" ]; then
+	VERSION=7.3.1
+fi
 
-TARBALL=logwatch-$1.tar.gz
+TARBALL=logwatch-$VERSION.tar.gz
 BASEDIR=logwatch-$VERSION
 ORIGLINK=logwatch_$VERSION.orig.tar.gz
 
@@ -19,6 +22,9 @@
 echo "Copying debian dir to build directory ...."
 cp -a debian $BASEDIR
 
+cp -a contrib/scripts/ $BASEDIR/
+cp -a contrib/conf/ $BASEDIR/
+
 #patch
 for i in patches/*.diff; do 
 	if [ -f "$i" ]; then

Added: trunk/contrib/README
===================================================================
--- trunk/contrib/README	                        (rev 0)
+++ trunk/contrib/README	2006-09-16 20:07:15 UTC (rev 47)
@@ -0,0 +1,2 @@
+This directory contains additional scripts, which are not yet included in 
+upstream logwatch.

Added: trunk/contrib/conf/logfiles/dpkg.conf
===================================================================
--- trunk/contrib/conf/logfiles/dpkg.conf	                        (rev 0)
+++ trunk/contrib/conf/logfiles/dpkg.conf	2006-09-16 20:07:15 UTC (rev 47)
@@ -0,0 +1,20 @@
+##########################################################################
+# $Id: $
+##########################################################################
+
+########################################################
+# Created by HMR 2/28/06
+# Modified by Willi Mann <willi at wm1.at>
+#
+# What actual file?  Defaults to LogPath if not absolute path....
+LogFile = dpkg.log
+LogFile = dpkg.log.1
+# If the archives are searched, here is one or more line
+# (optionally containing wildcards) that tell where they are...
+# Note: if these are gzipped, you need to end with a .gz even if
+#       you use wildcards...
+Archive = dpkg.log.*.gz
+
+# HMR 3/1/06 use custom applyeurodate script to filter out European time stamps
+# ./scripts/shared/applyeurodate
+*ApplyEuro2Date

Added: trunk/contrib/conf/services/dpkg.conf
===================================================================
--- trunk/contrib/conf/services/dpkg.conf	                        (rev 0)
+++ trunk/contrib/conf/services/dpkg.conf	2006-09-16 20:07:15 UTC (rev 47)
@@ -0,0 +1,20 @@
+###########################################################################
+# $Id: $
+###########################################################################
+
+# You can put comments anywhere you want to.  They are effective for the
+# rest of the line.
+
+# this is in the format of <name> = <value>.  Whitespace at the beginning
+# and end of the lines is removed.  Whitespace before and after the = sign
+# is removed.  Everything is case *insensitive*.
+
+# Yes = True  = On  = 1
+# No  = False = Off = 0
+
+Title = dpkg status changes
+
+# Which logfile group...
+LogFile = dpkg
+
+

Added: trunk/contrib/scripts/services/dpkg
===================================================================
--- trunk/contrib/scripts/services/dpkg	                        (rev 0)
+++ trunk/contrib/scripts/services/dpkg	2006-09-16 20:07:15 UTC (rev 47)
@@ -0,0 +1,66 @@
+#!/usr/bin/perl -w
+#
+# Copyright 2006 by Willi Mann <willi at wm1.at>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the Free
+# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA  02111-1307  USA.
+
+use strict;
+
+my @install;
+my @upgrade;
+my @remove;
+my @purge;
+
+my @unknown;
+
+while(my $line=<STDIN>) {
+	chomp $line;
+	if ( my ( $do, $pkg, $ver1, $ver2) = ( $line =~ /^\S+ \S+ (install|upgrade|remove|purge) (\S+) (\S+)(?: (\S+))?/ )) {
+		if(($do eq "remove" or $do eq "purge") and ($ver1 ne $ver2)) {
+			push @unknown, $line;
+		} elsif ($do eq "remove") {
+			push @remove, "$pkg $ver1";
+		} elsif ( $do eq "purge") {
+			push @purge, "$pkg $ver1";
+		} elsif ($ver1 =~ /[<>]/) {
+			push @install, "$pkg $ver2";
+		} else {
+			push @upgrade, "$pkg $ver1 => $ver2";
+		}
+	} elsif ( $line =~ /^\S+ \S+ status / ) {
+		#ignore
+	} else {
+		push @unknown, $line;
+	}
+}
+
+my @k = ( "Installed" , \@install, 
+          "Upgraded" , \@upgrade, 
+	  "Removed", \@remove, 
+	  "Purged", \@purge, 
+	  "Unknown lines", \@unknown);
+
+while (@k > 0) {
+	my $text = shift @k;
+	my $array = shift @k;
+	if(@$array) {
+		print "\n$text:\n";
+		foreach my $line (sort @$array) {
+			print "   $line\n";
+		}
+
+	}
+}


Property changes on: trunk/contrib/scripts/services/dpkg
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/contrib/scripts/shared/applyeuro2date
===================================================================
--- trunk/contrib/scripts/shared/applyeuro2date	                        (rev 0)
+++ trunk/contrib/scripts/shared/applyeuro2date	2006-09-16 20:07:15 UTC (rev 47)
@@ -0,0 +1,37 @@
+#!/usr/bin/perl
+##########################################################################
+# $Id: $
+##########################################################################
+
+########################################################
+#  written by (or more: copied by)
+#           Willi Mann <willi at wm1.at>
+########################################################
+
+#
+## Modified from applyeurodate by debian at onerussian.com to accept dates
+## as reported by dpkg:
+#2006-09-04 11:17:31 upgrade cvs 1:1.12.13-3 1:1.12.13-4
+#
+# This script is licensed under the same terms as logwatch, ie under
+# permissive X11 license (see /usr/share/doc/logwatch/copyright for more
+# details)
+#
+use Logwatch ':dates';
+
+my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0;
+
+$SearchDate = TimeFilter('%Y-%m-%d %H:%M:%S');
+
+if ( $Debug > 5 ) {
+   print STDERR "DEBUG: Inside ApplyEuro2Date...\n";
+   print STDERR "DEBUG: Looking For: " . $SearchDate . "\n";
+}
+
+while (defined($ThisLine = <STDIN>)) {
+   if ($ThisLine =~ m/^$SearchDate /o) {
+      print $ThisLine;
+   }
+}
+
+# vi: shiftwidth=3 syntax=perl tabstop=3 et


Property changes on: trunk/contrib/scripts/shared/applyeuro2date
___________________________________________________________________
Name: svn:executable
   + *

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2006-08-04 18:38:41 UTC (rev 46)
+++ trunk/debian/changelog	2006-09-16 20:07:15 UTC (rev 47)
@@ -1,3 +1,11 @@
+logwatch (7.3.1-1~test1) unstable; urgency=low
+
+  * New upstream release
+    - closes: #385032: some logging changes in postfix 2.3
+  * Add parser for dpkg.log
+
+ -- Willi Mann <willi at wm1.at>  Sat, 16 Sep 2006 21:04:24 +0200
+
 logwatch (7.3-2) unstable; urgency=low
 
   * Update fail2ban script to recognise some more messages. Patch by 

Deleted: trunk/debian/dist.conf/logfiles/fail2ban.conf
===================================================================
--- trunk/debian/dist.conf/logfiles/fail2ban.conf	2006-08-04 18:38:41 UTC (rev 46)
+++ trunk/debian/dist.conf/logfiles/fail2ban.conf	2006-09-16 20:07:15 UTC (rev 47)
@@ -1,23 +0,0 @@
-##########################################################################
-# $Id: $
-##########################################################################
-
-########################################################
-# Created by HMR 2/28/06
-# Modified by Yaroslav Halchenko <debian at onerussian.com>
-#
-# What actual file?  Defaults to LogPath if not absolute path....
-LogFile = fail2ban.log
-
-# If the archives are searched, here is one or more line
-# (optionally containing wildcards) that tell where they are...
-# Note: if these are gzipped, you need to end with a .gz even if
-#       you use wildcards...
-Archive = fail2ban.log.*
-Archive = fail2ban.log.*.gz
-Archive = archiv/fail2ban.log.*
-Archive = archiv/fail2ban.log.*.gz
-
-# HMR 3/1/06 use custom applyeurodate script to filter out European time stamps
-# ./scripts/shared/applyeurodate
-*ApplyEuroDate

Deleted: trunk/debian/dist.conf/services/fail2ban.conf
===================================================================
--- trunk/debian/dist.conf/services/fail2ban.conf	2006-08-04 18:38:41 UTC (rev 46)
+++ trunk/debian/dist.conf/services/fail2ban.conf	2006-09-16 20:07:15 UTC (rev 47)
@@ -1,20 +0,0 @@
-###########################################################################
-# $Id: $
-###########################################################################
-
-# You can put comments anywhere you want to.  They are effective for the
-# rest of the line.
-
-# this is in the format of <name> = <value>.  Whitespace at the beginning
-# and end of the lines is removed.  Whitespace before and after the = sign
-# is removed.  Everything is case *insensitive*.
-
-# Yes = True  = On  = 1
-# No  = False = Off = 0
-
-Title = fail2ban-messages
-
-# Which logfile group...
-LogFile = fail2ban
-
-

Deleted: trunk/patches/00-addfail2ban.diff
===================================================================
--- trunk/patches/00-addfail2ban.diff	2006-08-04 18:38:41 UTC (rev 46)
+++ trunk/patches/00-addfail2ban.diff	2006-09-16 20:07:15 UTC (rev 47)
@@ -1,148 +0,0 @@
-diff -urN logwatch.b/scripts/services/fail2ban logwatch-7.3/scripts/services/fail2ban
---- logwatch.b/scripts/services/fail2ban	1970-01-01 01:00:00.000000000 +0100
-+++ logwatch-7.3/scripts/services/fail2ban	2006-05-01 18:09:08.000000000 +0200
-@@ -0,0 +1,103 @@
-+#!/usr/bin/perl
-+##########################################################################
-+# $Id: $
-+##########################################################################
-+# $Log:  $
-+# Revision ?.??  2005/10/19 05:48:39  
-+#  Written by Yaroslav Halchenko <debian at onerussian.com> for fail2ban
-+#
-+# This script is licensed under the same terms as logwatch, ie under
-+# permissive X11 license (see /usr/share/doc/logwatch/copyright for more
-+# details)
-+#
-+##########################################################################
-+
-+use strict;
-+use Logwatch ':all';
-+
-+my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0;
-+my $Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'} || 0;
-+my $IgnoreHost = $ENV{'sshd_ignore_host'} || "";
-+my $DebugCounter = 0;
-+
-+my @OtherList = ();
-+
-+my %ServicesBans = ();
-+
-+if ( $Debug >= 5 ) {
-+	print STDERR "\n\nDEBUG: Inside Fail2Ban Filter \n\n";
-+	$DebugCounter = 1;
-+}
-+
-+while (defined(my $ThisLine = <STDIN>)) {
-+	if ( $Debug >= 5 ) {
-+		print STDERR "DEBUG($DebugCounter): $ThisLine";
-+		$DebugCounter++;
-+	}
-+	chomp($ThisLine);
-+	if ( ($ThisLine =~ /..,... DEBUG: /) or
-+		 ($ThisLine =~ /..,... INFO: (Fail2Ban v.* is running|Exiting|Enabled sections:)/) or
-+		 ($ThisLine =~ /..,... WARNING: Verbose level is /) or
-+		 ($ThisLine =~ /..,... WARNING: Restoring firewall rules/)
-+		 )
-+	{
-+		if ( $Debug >= 6 ) {
-+			print STDERR "DEBUG($DebugCounter): line ignored\n";
-+		}
-+	} elsif ( my ($Service,$Action,$Host) = ($ThisLine =~ m/WARNING:\s(.*):\s(Ban|Unban)[^\.]* (\S+)/)) {
-+		if ( $Debug >= 6 ) {
-+			print STDERR "DEBUG($DebugCounter): Found $Action for $Service from $Host\n";
-+		}
-+		$ServicesBans{$Service}{$Host}{$Action}++;
-+		$ServicesBans{$Service}{"(all)"}{$Action}++;
-+	} elsif ( my ($Service,$Host,$NumFailures) = ($ThisLine =~ m/INFO: (\S+): (.+) has (\d+) login failure\(s\). Banned./)) {
-+	   if ($Debug >= 4) {
-+		   print STDERR "DEBUG: Found host $Host trying to access $Service - failed $NumFailures times\n";
-+	   }
-+	   push @{$ServicesBans{$Service}{$Host}{'Failures'}}, $NumFailures;
-+   } else
-+   {
-+	   # Report any unmatched entries...
-+	   push @OtherList, "$ThisLine\n";
-+   }
-+}
-+
-+###########################################################
-+
-+
-+if (keys %ServicesBans) {
-+   printf("\nBanned services with Fail2Ban:                             Bans:Unbans\n");
-+   foreach my $service (sort {$a cmp $b} keys %ServicesBans) {
-+      printf("   %-55s [%3d:%-3d]\n", "$service:",
-+			 $ServicesBans{$service}{'(all)'}{'Ban'},
-+			 $ServicesBans{$service}{'(all)'}{'Unban'});
-+	  delete $ServicesBans{$service}{'(all)'};
-+      my $totalSort = TotalCountOrder(%{$ServicesBans{$service}}, \&SortIP);
-+	  if ($Detail >= 5) {
-+		  foreach my $ip (sort $totalSort keys %{$ServicesBans{$service}}) {
-+			  my $name = LookupIP($ip);
-+			  printf("      %-53s %3d:%-3d\n",
-+					 $name,
-+					 $ServicesBans{$service}{$ip}{'Ban'},
-+					 $ServicesBans{$service}{$ip}{'Unban'});
-+			  if (($Detail >= 10) and ($ServicesBans{$service}{$ip}{'Failures'}>0)) {
-+				  print "        Failed ";
-+				  foreach my $fails (@{$ServicesBans{$service}{$ip}{'Failures'}}) {
-+					  print " $fails";
-+				  }
-+				  print " times";
-+				  print "\n";
-+			  }
-+		  }
-+	  }
-+  }
-+}
-+
-+if ($Detail>0 and $#OtherList >= 0) {
-+   print "\n**Unmatched Entries**\n";
-+   print @OtherList;
-+}
-+
-+exit(0);
-+
-+# vi: shiftwidth=3 tabstop=3 syntax=perl et
-diff -urN logwatch.b/scripts/shared/applyeurodate logwatch-7.3/scripts/shared/applyeurodate
---- logwatch.b/scripts/shared/applyeurodate	1970-01-01 01:00:00.000000000 +0100
-+++ logwatch-7.3/scripts/shared/applyeurodate	2006-05-01 18:15:09.000000000 +0200
-@@ -0,0 +1,37 @@
-+#!/usr/bin/perl
-+##########################################################################
-+# $Id: $
-+##########################################################################
-+
-+########################################################
-+# This was originally written by 
-+#           Yaroslav Halchenko <debian at onerussian.com>
-+########################################################
-+
-+#
-+## Modified from applystddate by yoh at onerussian.com to accept dates
-+## as reported by fail2ban:
-+#2006-03-17 05:17:19,757 WARNING: SSH: Unban 202.63.117.71
-+#
-+# This script is licensed under the same terms as logwatch, ie under
-+# permissive X11 license (see /usr/share/doc/logwatch/copyright for more
-+# details)
-+#
-+use Logwatch ':dates';
-+
-+my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0;
-+
-+$SearchDate = TimeFilter('%Y-%m-%d %H:%M:%S,...');
-+
-+if ( $Debug > 5 ) {
-+   print STDERR "DEBUG: Inside ApplyEuroDate...\n";
-+   print STDERR "DEBUG: Looking For: " . $SearchDate . "\n";
-+}
-+
-+while (defined($ThisLine = <STDIN>)) {
-+   if ($ThisLine =~ m/^$SearchDate /o) {
-+      print $ThisLine;
-+   }
-+}
-+
-+# vi: shiftwidth=3 syntax=perl tabstop=3 et

Deleted: trunk/patches/01-fail2banv2.diff
===================================================================
--- trunk/patches/01-fail2banv2.diff	2006-08-04 18:38:41 UTC (rev 46)
+++ trunk/patches/01-fail2banv2.diff	2006-09-16 20:07:15 UTC (rev 47)
@@ -1,170 +0,0 @@
-diff -ur logwatch-7.3.b/scripts/services/fail2ban logwatch-7.3/scripts/services/fail2ban
---- logwatch-7.3.b/scripts/services/fail2ban	2006-05-25 17:35:02.000000000 +0200
-+++ logwatch-7.3/scripts/services/fail2ban	2006-05-25 17:36:47.000000000 +0200
-@@ -19,7 +19,9 @@
- my $Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'} || 0;
- my $IgnoreHost = $ENV{'sshd_ignore_host'} || "";
- my $DebugCounter = 0;
--
-+my $ReInitializations = 0;
-+my @IptablesErrors = ();
-+my $NotValidIP = 0;		# reported invalid IPs number
- my @OtherList = ();
- 
- my %ServicesBans = ();
-@@ -30,72 +32,98 @@
- }
- 
- while (defined(my $ThisLine = <STDIN>)) {
--	if ( $Debug >= 5 ) {
--		print STDERR "DEBUG($DebugCounter): $ThisLine";
--		$DebugCounter++;
-+    if ( $Debug >= 5 ) {
-+	print STDERR "DEBUG($DebugCounter): $ThisLine";
-+	$DebugCounter++;
-+    }
-+    chomp($ThisLine);
-+    if ( ($ThisLine =~ /..,... DEBUG: /) or
-+	 ($ThisLine =~ /..,... INFO: (Fail2Ban v.* is running|Exiting|Enabled sections:)/) or
-+	 ($ThisLine =~ /..,... WARNING: Verbose level is /) or
-+	 ($ThisLine =~ /..,... WARNING: Restoring firewall rules/)
-+	 )
-+    {
-+	if ( $Debug >= 6 ) {
-+	    print STDERR "DEBUG($DebugCounter): line ignored\n";
- 	}
--	chomp($ThisLine);
--	if ( ($ThisLine =~ /..,... DEBUG: /) or
--		 ($ThisLine =~ /..,... INFO: (Fail2Ban v.* is running|Exiting|Enabled sections:)/) or
--		 ($ThisLine =~ /..,... WARNING: Verbose level is /) or
--		 ($ThisLine =~ /..,... WARNING: Restoring firewall rules/)
--		 )
--	{
--		if ( $Debug >= 6 ) {
--			print STDERR "DEBUG($DebugCounter): line ignored\n";
--		}
--	} elsif ( my ($Service,$Action,$Host) = ($ThisLine =~ m/WARNING:\s(.*):\s(Ban|Unban)[^\.]* (\S+)/)) {
--		if ( $Debug >= 6 ) {
--			print STDERR "DEBUG($DebugCounter): Found $Action for $Service from $Host\n";
--		}
--		$ServicesBans{$Service}{$Host}{$Action}++;
--		$ServicesBans{$Service}{"(all)"}{$Action}++;
--	} elsif ( my ($Service,$Host,$NumFailures) = ($ThisLine =~ m/INFO: (\S+): (.+) has (\d+) login failure\(s\). Banned./)) {
--	   if ($Debug >= 4) {
--		   print STDERR "DEBUG: Found host $Host trying to access $Service - failed $NumFailures times\n";
--	   }
--	   push @{$ServicesBans{$Service}{$Host}{'Failures'}}, $NumFailures;
--   } else
--   {
--	   # Report any unmatched entries...
--	   push @OtherList, "$ThisLine\n";
--   }
-+    } elsif ( my ($Service,$Action,$Host) = ($ThisLine =~ m/WARNING:\s(.*):\s(Ban|Unban)[^\.]* (\S+)/)) {
-+	if ( $Debug >= 6 ) {
-+	    print STDERR "DEBUG($DebugCounter): Found $Action for $Service from $Host\n";
-+	}
-+	$ServicesBans{$Service}{$Host}{$Action}++;
-+	$ServicesBans{$Service}{"(all)"}{$Action}++;
-+    } elsif ( my ($Service,$Host,$NumFailures) = ($ThisLine =~ m/INFO: (\S+): (.+) has (\d+) login failure\(s\). Banned./)) {
-+	if ($Debug >= 4) {
-+	    print STDERR "DEBUG: Found host $Host trying to access $Service - failed $NumFailures times\n";
-+	}
-+	push @{$ServicesBans{$Service}{$Host}{'Failures'}}, $NumFailures;
-+    } elsif ( my ($Service,$Host) = ($ThisLine =~ m/ ERROR:\s(.*):\s(\S+)\salready in ban list/)) {
-+	$ServicesBans{$Service}{$Host}{'AlreadyInTheList'}++;
-+    } elsif ( my ($Service,$Host) = ($ThisLine =~ m/ WARNING:\s(.*):\sReBan (\S+)/)) {
-+	$ServicesBans{$Service}{$Host}{'ReBan'}++;
-+    } elsif ($ThisLine =~ /..,... ERROR: (Execution of command )?\'iptables/) {
-+	push @IptablesErrors, "$ThisLine\n";
-+    } elsif ($ThisLine =~ /..,... WARNING: \#\S+ reinitialization of firewalls/) {
-+	$ReInitializations++;
-+    } elsif ($ThisLine =~ /..,... WARNING:  is not a valid IP address/) {
-+	# just ignore - this will be fixed within fail2ban and is harmless warning
-+    }
-+    else
-+    {
-+	# Report any unmatched entries...
-+	push @OtherList, "$ThisLine\n";
-+    }
- }
- 
- ###########################################################
- 
- 
- if (keys %ServicesBans) {
--   printf("\nBanned services with Fail2Ban:                             Bans:Unbans\n");
--   foreach my $service (sort {$a cmp $b} keys %ServicesBans) {
--      printf("   %-55s [%3d:%-3d]\n", "$service:",
--			 $ServicesBans{$service}{'(all)'}{'Ban'},
--			 $ServicesBans{$service}{'(all)'}{'Unban'});
--	  delete $ServicesBans{$service}{'(all)'};
--      my $totalSort = TotalCountOrder(%{$ServicesBans{$service}}, \&SortIP);
--	  if ($Detail >= 5) {
--		  foreach my $ip (sort $totalSort keys %{$ServicesBans{$service}}) {
--			  my $name = LookupIP($ip);
--			  printf("      %-53s %3d:%-3d\n",
--					 $name,
--					 $ServicesBans{$service}{$ip}{'Ban'},
--					 $ServicesBans{$service}{$ip}{'Unban'});
--			  if (($Detail >= 10) and ($ServicesBans{$service}{$ip}{'Failures'}>0)) {
--				  print "        Failed ";
--				  foreach my $fails (@{$ServicesBans{$service}{$ip}{'Failures'}}) {
--					  print " $fails";
--				  }
--				  print " times";
--				  print "\n";
--			  }
--		  }
--	  }
--  }
-+    printf("\nBanned services with Fail2Ban:				 Bans:Unbans\n");
-+    foreach my $service (sort {$a cmp $b} keys %ServicesBans) {
-+	printf("   %-55s [%3d:%-3d]\n", "$service:",
-+	       $ServicesBans{$service}{'(all)'}{'Ban'},
-+	       $ServicesBans{$service}{'(all)'}{'Unban'});
-+	delete $ServicesBans{$service}{'(all)'};
-+	my $totalSort = TotalCountOrder(%{$ServicesBans{$service}}, \&SortIP);
-+	if ($Detail >= 5) {
-+	    foreach my $ip (sort $totalSort keys %{$ServicesBans{$service}}) {
-+		my $name = LookupIP($ip);
-+		printf("      %-53s %3d:%-3d\n",
-+		       $name,
-+		       $ServicesBans{$service}{$ip}{'Ban'},
-+		       $ServicesBans{$service}{$ip}{'Unban'});
-+		if (($Detail >= 10) and ($ServicesBans{$service}{$ip}{'Failures'}>0)) {
-+		    print "	   Failed ";
-+		    foreach my $fails (@{$ServicesBans{$service}{$ip}{'Failures'}}) {
-+			print " $fails";
-+		    }
-+		    print " times";
-+		    printf("\n	   %d Duplicate Ban attempts", $ServicesBans{$service}{$ip}{'AlreadyInTheList'}) ;
-+		    printf("\n	   %d ReBans due to rules reinitilizations", $ServicesBans{$service}{$ip}{'ReBan'}) ;
-+		    print "\n";
-+		}
-+	    }
-+	}
-+    }
- }
- 
--if ($Detail>0 and $#OtherList >= 0) {
--   print "\n**Unmatched Entries**\n";
--   print @OtherList;
-+
-+if ($Detail>0) {
-+    if ($#IptablesErrors > 0) {
-+	printf("\n%d faulty iptables invocation(s)", $#IptablesErrors);
-+	if ($Detail > 5) {
-+	    print ":\n";
-+	    print @IptablesErrors ;
-+	}
-+    }
-+    if ($ReInitializations > 0) {
-+	printf("\n%d fail2ban rules reinitialization(s)", $ReInitializations);
-+    }
-+    if ($#OtherList >= 0) {
-+	print "\n**Unmatched Entries**\n";
-+	print @OtherList;
-+    }
- }
- 
- exit(0);

Modified: trunk/patches/APPLIED_NEXT_UPSTREAM
===================================================================
--- trunk/patches/APPLIED_NEXT_UPSTREAM	2006-08-04 18:38:41 UTC (rev 46)
+++ trunk/patches/APPLIED_NEXT_UPSTREAM	2006-09-16 20:07:15 UTC (rev 47)
@@ -1,2 +1 @@
-service-smartd.diff
-z-356815-imapd.diff
+

Deleted: trunk/patches/service-smartd.diff
===================================================================
--- trunk/patches/service-smartd.diff	2006-08-04 18:38:41 UTC (rev 46)
+++ trunk/patches/service-smartd.diff	2006-09-16 20:07:15 UTC (rev 47)
@@ -1,14 +0,0 @@
-diff -ur logwatch-7.3.b/scripts/services/smartd logwatch-7.3/scripts/services/smartd
---- logwatch-7.3.b/scripts/services/smartd	2006-03-25 14:37:58.000000000 +0100
-+++ logwatch-7.3/scripts/services/smartd	2006-03-25 14:44:47.000000000 +0100
-@@ -41,6 +41,10 @@
-        # ignore
-    } elsif ( ($Device) = ($ThisLine =~ /^Device: ([^,]+), enabled autosave \(cleared GLTSD bit\)\./ )) {
-        # ignore
-+   } elsif ( ($Device) = ($ThisLine =~ /^Device: ([^,]+), enabled SMART Attribute Autosave/ )) {
-+       # ignore
-+   } elsif ( ($Device) = ($ThisLine =~ /^Device: ([^,]+), enabled SMART Automatic Offline Testing/ )) {
-+       # ignore
-    } elsif ( ($Device) = ($ThisLine =~ /^Device: ([^,]+), Self-Test Log error count increased from \d+ to \d+/ )) {
-        # ignore
-    } elsif ( ($Device,$Msg) = ($ThisLine =~ /^Device: ([^,]+), new Self-Test Log error at hour timestamp \d+/ )) {

Deleted: trunk/patches/z-356815-imapd.diff
===================================================================
--- trunk/patches/z-356815-imapd.diff	2006-08-04 18:38:41 UTC (rev 46)
+++ trunk/patches/z-356815-imapd.diff	2006-09-16 20:07:15 UTC (rev 47)
@@ -1,14 +0,0 @@
-diff -ur logwatch-7.2.1/scripts/services/imapd logwatch-7.2.1-new/scripts/services/imapd
---- logwatch-7.2.1/scripts/services/imapd	2006-03-19 18:27:39.000000000 +0100
-+++ logwatch-7.2.1-new/scripts/services/imapd	2006-03-19 18:26:11.000000000 +0100
-@@ -38,7 +38,9 @@
-    if (
-       ($ThisLine =~ /^Initializing */) or
-       ($ThisLine =~ /^spgetpwnam: can't find user: */) or
--      ($ThisLine =~ /^couriertls: read: Connection reset by peer/ )
-+      ($ThisLine =~ /^couriertls: read: Connection reset by peer/ ) or
-+      # timeouts are reported in some other scripts - maybe it should be here too?
-+      ($ThisLine =~ /^couriertls: read: Connection timed out/ ) 
-    ) {
-       # Don't care about these...
-    } elsif ( ($User, $Host) = ( $ThisLine =~ /^Login user=(.*?) host=(.*\[.*\])$/ ) ) {




More information about the Pkg-logwatch-general mailing list