Add sshd-undef patch (rhbz#783528)
This commit is contained in:
parent
63e79b16a7
commit
8ebb6d2098
24
logwatch-sshd-undef.patch
Normal file
24
logwatch-sshd-undef.patch
Normal file
@ -0,0 +1,24 @@
|
||||
--- scripts/services/sshd.orig 2012-04-27 10:13:45.000000000 +0200
|
||||
+++ scripts/services/sshd 2012-04-27 13:57:36.880932891 +0200
|
||||
@@ -450,8 +450,19 @@ while (defined(my $ThisLine = <STDIN>))
|
||||
|
||||
foreach my $Host (keys %PotentialIllegalUsers) {
|
||||
foreach my $User (keys %{$PotentialIllegalUsers{$Host}}) {
|
||||
- while ($IllegalUsers{$Host}{$User} < $PotentialIllegalUsers{$Host}{$User}) {
|
||||
- $IllegalUsers{$Host}{$User}++;
|
||||
+ my @user_hosts = grep { $PotentialIllegalUsers{$_}{$User} } keys %PotentialIllegalUsers;
|
||||
+
|
||||
+ if ($Host eq "undef") {
|
||||
+ if ((scalar @user_hosts) == 1 && $user_hosts[0] == "undef") {
|
||||
+ # Report illegal user from "undef" only if there are no other hosts
|
||||
+ # for the given user
|
||||
+ $IllegalUsers{"undef"}{$User}++;
|
||||
+ }
|
||||
+ }
|
||||
+ else {
|
||||
+ while ($IllegalUsers{$Host}{$User} < $PotentialIllegalUsers{$Host}{$User}) {
|
||||
+ $IllegalUsers{$Host}{$User}++;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -33,6 +33,8 @@ Patch12: logwatch-secure-update.patch
|
||||
Patch13: logwatch-mail-headers.patch
|
||||
# not yet in upstream
|
||||
Patch14: logwatch-systemd-logind.patch
|
||||
# not yet in upstream
|
||||
Patch15: logwatch-sshd-undef.patch
|
||||
Requires: textutils sh-utils grep mailx
|
||||
Requires: perl(Date::Manip)
|
||||
BuildArchitectures: noarch
|
||||
@ -59,6 +61,7 @@ of the package on many systems.
|
||||
%patch12 -p0
|
||||
%patch13 -p0
|
||||
%patch14 -p0
|
||||
%patch15 -p0
|
||||
rm -f scripts/services/*.orig
|
||||
|
||||
%build
|
||||
@ -155,6 +158,7 @@ echo "# Configuration overrides for specific logfiles/services may be placed her
|
||||
- Add secure-update patch (rhbz#809314)
|
||||
- Add mail-headers patch (rhbz#811185)
|
||||
- Add systemd-logind patch (rhbz#812880)
|
||||
- Add sshd-undef patch (rhbz#783528)
|
||||
|
||||
* Wed Apr 25 2012 Jan Synáček <jsynacek@redhat.com> - 7.4.0-10.20120425svn100
|
||||
- Update to revision 100
|
||||
|
||||
Loading…
Reference in New Issue
Block a user