From 38fb24e643ff0f2743b43d44840af2d77a2be877 Mon Sep 17 00:00:00 2001 From: Ivana Varekova Date: Wed, 17 Dec 2008 12:19:38 +0000 Subject: [PATCH] - fix dovecot,named and openvpn scrpts(#476620) --- logwatch-7.3.6-dovecot.patch | 72 +++++++++++++++++++++++++++++ logwatch-7.3.6-named4.patch | 85 +++++++++++++++++++++++++++++++++++ logwatch-7.3.6-openvpn3.patch | 13 ++++++ logwatch.spec | 7 +++ 4 files changed, 177 insertions(+) create mode 100644 logwatch-7.3.6-dovecot.patch create mode 100644 logwatch-7.3.6-named4.patch create mode 100644 logwatch-7.3.6-openvpn3.patch diff --git a/logwatch-7.3.6-dovecot.patch b/logwatch-7.3.6-dovecot.patch new file mode 100644 index 0000000..db8da16 --- /dev/null +++ b/logwatch-7.3.6-dovecot.patch @@ -0,0 +1,72 @@ +diff -up logwatch-7.3.6/scripts/services/dovecot.pom logwatch-7.3.6/scripts/services/dovecot +--- logwatch-7.3.6/scripts/services/dovecot.pom 2008-12-16 15:52:59.000000000 +0100 ++++ logwatch-7.3.6/scripts/services/dovecot 2008-12-17 09:35:09.000000000 +0100 +@@ -105,8 +105,10 @@ while (defined($ThisLine = )) { + $Disconnected{$Reason}++; + } elsif (($Reason, $Host) = ($ThisLine =~ /TLS initialization failed/) ) { + $TLSInitFail++; +- } elsif (($Host) = ($ThisLine =~ /Aborted login \[(.*)\]/) ) { ++ } elsif (($Host) = ($ThisLine =~ /Aborted login \[(.*)\]/)) { + $Aborted{$Host}++; ++ } elsif (($Reason) = ($ThisLine =~ /Aborted login \((.*)\):/)) { ++ $Aborted{$Reason}++; + + # This is for Dovecot 1.0 series + +@@ -114,17 +116,25 @@ while (defined($ThisLine = )) { + $Disconnected{"Inactivity"}++; + } elsif ($ThisLine =~ /Disconnected in IDLE/) { + $Disconnected{"in IDLE"}++; +- } elsif ($ThisLine =~ /Disconnected$/) { ++ } elsif (($ThisLine =~ /Disconnected$/) or ++ (($Reason) = ($ThisLine =~ /pop3-login: Disconnected: (.+)/)) or ++ (($Reason) = ($ThisLine =~ /imap-login: Disconnected: (.+)/)) ) { + $Disconnected{"no reason"}++; +- } elsif (($Reason) = ($ThisLine =~ /pop3-login: Disconnected: (.+)/) ) { +- $Disconnected{"no reason"}++; +- } elsif (($Reason) = ($ThisLine =~ /imap-login: Disconnected: (.+)/) ) { +- $Disconnected{"no reason"}++; +- } elsif (($Reason) = ($ThisLine =~ /IMAP.+: Disconnected: (.+)/) ) { +- $Disconnected{$Reason}++; +- } elsif (($Reason) = ($ThisLine =~ /POP3.+: Disconnected: (.+) top/) ) { ++ } elsif ( (($Reason) = ($ThisLine =~ /POP3.+: Disconnected: (.+) top/)) or ++ (($Reason) = ($ThisLine =~ /pop3-login: Disconnected \((.+)\): /)) or ++ (($Reason) = ($ThisLine =~ /IMAP.+: Disconnected: (.+) bytes=/)) or ++ (($Reason) = ($ThisLine =~ /IMAP.+: Disconnected: (.+)/)) ) { + $Disconnected{$Reason}++; +- ++ } elsif (($Reason) = ($ThisLine =~ /IMAP.+: Connection closed bytes=/)) { ++ $ConnectionCl{"no reason"}++; ++ } elsif ( (($Reason) = ($ThisLine =~ /IMAP.+: Connection closed: (.*) bytes=/)) or ++ (($Reason) = ($ThisLine =~ /POP3.+: Connection closed: (.*) (top=|bytes=)/)) ) { ++ $ConnectionCl{$Reason}++; ++ } elsif ($ThisLine =~ /POP3.+: Connection closed top=.* retr=.* del=.* size=.*/) { ++ $ConnectionCl{"no reason"}++; ++ } elsif (($Error) = ($ThisLine =~ /child \d* \(login\) returned error (.*)/)) { ++ # dovecot: child 23747 (login) returned error 89 ++ $ChildErr{$Error}++; + } else { + # Report any unmatched entries... + chomp($ThisLine); +@@ -225,6 +235,21 @@ if (keys %Disconnected) { + } + } + ++if (keys %ConnectionCl) { ++ print "\n\nDovecot connections closed:"; ++ foreach my $Reason (sort keys %ConnectionCl) { ++ print "\n $Reason: $ConnectionCl{$Reason} Time(s)"; ++ } ++} ++ ++if (keys %ChildErr) { ++ print "\n\nDovecot child error:"; ++ foreach my $Error (sort keys %ChildErr) { ++ print "\n error number ". $Error . ": ". $ChildErr{$Error} ." Time(s)"; ++ } ++} ++ ++ + if ((keys %Aborted) && ($Detail >= 10)) { + print "\n\nLogout/aborts:"; + foreach my $Host (sort keys %Aborted) { diff --git a/logwatch-7.3.6-named4.patch b/logwatch-7.3.6-named4.patch new file mode 100644 index 0000000..c3dc0d4 --- /dev/null +++ b/logwatch-7.3.6-named4.patch @@ -0,0 +1,85 @@ +diff -up logwatch-7.3.6/scripts/services/named.p1 logwatch-7.3.6/scripts/services/named +--- logwatch-7.3.6/scripts/services/named.p1 2008-12-17 13:13:49.000000000 +0100 ++++ logwatch-7.3.6/scripts/services/named 2008-12-17 13:14:59.000000000 +0100 +@@ -137,7 +137,7 @@ while (defined($ThisLine = )) { + ($ThisLine =~ /Response from unexpected source/) or + ($ThisLine =~ /No root nameservers for class IN/) or + ($ThisLine =~ /recvfrom: No route to host/) or +- ($ThisLine =~ /Connection refused/) or ++ ($ThisLine =~ /(C|c)onnection refused/) or + ($ThisLine =~ /lame server resolving/) or + ($ThisLine =~ /transfer of/) or + ($ThisLine =~ /using \d+ CPU/) or +@@ -150,6 +150,8 @@ while (defined($ThisLine = )) { + ($ThisLine =~ /the default for the .* option is now/) or + ($ThisLine =~ /stopping command channel on \S+/) or + ($ThisLine =~ /Malformed response from/) or ++ ($ThisLine =~ /client .* response from Internet for .*/) or ++ ($ThisLine =~ /client .+ query \(cache\) '.*' denied/) or + ($ThisLine =~ /client .+#\d+: query:/) or + # Do we really want to ignore these? + #($ThisLine =~ /unknown logging category/) or +@@ -180,6 +182,7 @@ while (defined($ThisLine = )) { + ($ThisLine =~ /.*: not a valid number$/) or + ($ThisLine =~ /.*: unexpected end of input/) or + ($ThisLine =~ /too many timeouts resolving '.*' .*: disabling EDNS/) or ++ ($ThisLine =~ /too many timeouts resolving '.*' .*: reducing the advertised EDNS UDP packet size to .* octets/) or + ($ThisLine =~ /reloading zones succeeded/) + # too many timeouts resolving 'ns-ext.nrt1.isc.org/AAAA' (in '.'?): disabling EDNS: 3 Time(s) + ) { +@@ -220,6 +223,8 @@ while (defined($ThisLine = )) { + $ZoneRemoved{$Zone}++; + } elsif ( ($Zone) = ( $ThisLine =~ /received notify for zone '(.*)'/ ) ) { + $ZoneReceivedNotify{$Zone}++; ++ } elsif ( ($Zone) = ( $ThisLine =~ /zone (.*): notify from .* up to date/ ) ) { ++ $ZoneReceivedNotify{$Zone}++; + } elsif ( ($Host) = ( $ThisLine =~ /([^ ]+) has CNAME and other data \(invalid\)/ ) ) { + push @CNAMEAndOther, $Host; + } elsif ( ($File,$Line,$Entry,$Error) = ( $ThisLine =~ /dns_master_load: ([^:]+):(\d+): ([^ ]+): (.+)$/ ) ) { +@@ -278,6 +283,10 @@ while (defined($ThisLine = )) { + $UnknownCCCommands{$CCC}++; + } elsif (($CCC) = ($ThisLine =~ /received control channel command '(.*)'/)) { + $CCCommands{$CCC}++; ++ } elsif (($Name,$Address) = ($ThisLine =~ /network unreachable resolving '(.*)': (.*)/)) { ++ $NUR{$Name}{$Address}++; ++ } elsif (($Name,$Address) = ($ThisLine =~ /host unreachable resolving '(.*)': (.*)/)) { ++ $HUR{$Name}{$Address}++; + } else { + # Report any unmatched entries... + # remove PID from named messages +@@ -418,6 +427,26 @@ if ( ( $Detail >= 10 ) and (keys %Networ + } + } + ++if ( ( $Detail >= 10 ) and (keys %NUR) ) { ++ print "\nNetwork unreachable resolving for:\n"; ++ foreach $ThisOne (sort {$a cmp $b} keys %NUR) { ++ print " $ThisOne:\n"; ++ foreach $Host (sort {$a cmp $b} keys %{$NUR{$ThisOne}}) { ++ print " $Host: $NUR{$ThisOne}{$Host} Time(s)\n"; ++ } ++ } ++} ++ ++if ( ( $Detail >= 10 ) and (keys %HUR) ) { ++ print "\nHost unreachable resolving for:\n"; ++ foreach $ThisOne (sort {$a cmp $b} keys %HUR) { ++ print " $ThisOne:\n"; ++ foreach $Host (sort {$a cmp $b} keys %{$HUR{$ThisOne}}) { ++ print " $Host: $HUR{$ThisOne}{$Host} Time(s)\n"; ++ } ++ } ++} ++ + if ( ( $Detail >= 5 ) and (keys %ZoneUpdates) ) { + print "\nZone Updates:\n"; + foreach $ThisOne (sort {$a cmp $b} keys %ZoneUpdates) { +@@ -508,7 +537,7 @@ if ((keys %CCMessages) or (keys %CCMessa + } + + if ((keys %CCCommands) or (keys %UnknownCCCommands)) { +- print "\n Received control channel commands\n"; ++ print "\nReceived control channel commands\n"; + foreach $ThisOne (keys %CCCommands) { + print " " . $ThisOne . ": " . $CCCommands{$ThisOne} . " Time(s)\n"; + } diff --git a/logwatch-7.3.6-openvpn3.patch b/logwatch-7.3.6-openvpn3.patch new file mode 100644 index 0000000..2bcd700 --- /dev/null +++ b/logwatch-7.3.6-openvpn3.patch @@ -0,0 +1,13 @@ +diff -up logwatch-7.3.6/scripts/services/openvpn.pom logwatch-7.3.6/scripts/services/openvpn +--- logwatch-7.3.6/scripts/services/openvpn.pom 2008-12-16 15:52:59.000000000 +0100 ++++ logwatch-7.3.6/scripts/services/openvpn 2008-12-17 12:37:48.000000000 +0100 +@@ -80,7 +80,8 @@ while (defined($ThisLine = )) { + ($ThisLine =~ /^chroot to /) or + ($ThisLine =~ /TUN\/TAP TX queue length set to [0-9]*/) or + ($ThisLine =~ /Socket Buffers: R=\[[0-9]+->[0-9]+\] S=\[[0-9]+->[0-9]+\]/) or +- ($ThisLine =~ /OpenVPN .* built on [A-Z][a-z]{2} [ 12]?[0-9] [0-9]{4}/) ++ ($ThisLine =~ /OpenVPN .* built on [A-Z][a-z]{2} [ 12]?[0-9] [0-9]{4}/) or ++ ($ThisLine =~ /Authenticate\/Decrypt packet error: bad packet ID \(may be a replay\): \[ #.* \] -- see the man page entry for --no-replay and --replay-window for more info or silence this warning with --mute-replay-warnings/) + ) { + # Don't care about these... + } elsif (($status, $dn) = ( $ThisLine =~ /^VERIFY (.*): depth=.*, (.*)\// )) { diff --git a/logwatch.spec b/logwatch.spec index 7ee99cf..9635bfc 100644 --- a/logwatch.spec +++ b/logwatch.spec @@ -45,6 +45,9 @@ Patch45: logwatch-7.3.6-init2.patch Patch46: logwatch-7.3.6-secure2.patch Patch47: logwatch-7.3.6-exim.patch Patch48: logwatch-7.3.6-zz-disk_space2.patch +Patch49: logwatch-7.3.6-dovecot.patch +Patch50: logwatch-7.3.6-named4.patch +Patch51: logwatch-7.3.6-openvpn3.patch Requires: textutils sh-utils grep mailx Requires: perl(Date::Manip) @@ -98,6 +101,9 @@ of the package on many systems. %patch46 -p1 %patch47 -p1 %patch48 -p1 +%patch49 -p1 +%patch50 -p1 +%patch51 -p1 rm -f scripts/services/*.orig %build @@ -211,6 +217,7 @@ rm -rf %{buildroot} %changelog * Tue Dec 16 2008 Ivana Varekova 7.3.6-38 - remove obsolete patches +- fix dovecot,named and openvpn scrpts(#476620) * Mon Dec 8 2008 Ivana Varekova 7.3.6-37 - fix zz-disk_space script (#474810)