From 1a31503ee5edce093ce70b2e6a9e2e346e56eb42 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Fri, 6 Dec 2024 09:42:33 +0300 Subject: [PATCH] import logwatch-7.11-2.el10 --- .gitignore | 2 +- .logwatch.metadata | 2 +- SOURCES/sshd-sort-by-count.patch | 22 ++++++++++++++++++++++ SPECS/logwatch.spec | 13 +++++++++++-- 4 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 SOURCES/sshd-sort-by-count.patch diff --git a/.gitignore b/.gitignore index 8c7e193..c3b515f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/logwatch-7.10.tar.gz +SOURCES/logwatch-7.11.tar.gz diff --git a/.logwatch.metadata b/.logwatch.metadata index 970eab3..584a957 100644 --- a/.logwatch.metadata +++ b/.logwatch.metadata @@ -1 +1 @@ -d3abbbe94049b9b67ab229188fc36e46e9ae1129 SOURCES/logwatch-7.10.tar.gz +19f058372865172948db8159f2924628e2c2c836 SOURCES/logwatch-7.11.tar.gz diff --git a/SOURCES/sshd-sort-by-count.patch b/SOURCES/sshd-sort-by-count.patch new file mode 100644 index 0000000..b88670d --- /dev/null +++ b/SOURCES/sshd-sort-by-count.patch @@ -0,0 +1,22 @@ +--- a/scripts/services/sshd 2022-12-29 01:34:28.000000000 +0100 ++++ b/scripts/services/sshd 2024-11-27 13:33:50.590755283 +0100 +@@ -548,7 +548,8 @@ + + if (keys %BadLogins) { + print "\nFailed logins from:\n"; +- foreach my $ip (sort SortIP keys %BadLogins) { ++ my $totalSort = TotalCountOrder(%BadLogins, \&SortIP); ++ foreach my $ip (sort $totalSort keys %BadLogins) { + my $name = LookupIP($ip); + my $totcount = 0; + foreach my $user (keys %{$BadLogins{$ip}}) { +@@ -571,7 +572,8 @@ + print " (with threshold >= $IllegalUsersThreshold)"; + } + print ":\n"; +- foreach my $ip (sort SortIP keys %IllegalUsers) { ++ my $totalSort = TotalCountOrder(%IllegalUsers, \&SortIP); ++ foreach my $ip (sort $totalSort keys %IllegalUsers) { + my $name = LookupIP($ip); + my $totcount = 0; + foreach my $user (keys %{$IllegalUsers{$ip}}) { diff --git a/SPECS/logwatch.spec b/SPECS/logwatch.spec index a6d01e0..84e624b 100644 --- a/SPECS/logwatch.spec +++ b/SPECS/logwatch.spec @@ -1,11 +1,12 @@ %global _unitdir /usr/lib/systemd/system Summary: Analyzes and Reports on system logs Name: logwatch -Version: 7.10 -Release: 3%{?dist} +Version: 7.11 +Release: 2%{?dist} License: MIT URL: https://sourceforge.net/projects/logwatch/ Source0: https://sourceforge.net/projects/logwatch/files/%{name}-%{version}/%{name}-%{version}.tar.gz +Patch0: sshd-sort-by-count.patch BuildRequires: perl-generators Requires: grep Requires: perl(Date::Manip) @@ -129,6 +130,14 @@ echo "# Configuration overrides for specific logfiles/services may be placed her %{_unitdir}/logwatch.timer %changelog +* Wed Nov 27 2024 Pavel Simovec - 7.11-2 +- sshd: sort IP adresses by report count +- Resolves: RHEL-58995 + +* Mon Nov 25 2024 Pavel Simovec - 7.11-1 +- Update to 7.11 +- Resolves: RHEL-58713 + * Tue Oct 29 2024 Troy Dawson - 7.10-3 - Bump release for October 2024 mass rebuild: Resolves: RHEL-64018