Add pam_unix patch (rhbz#836183, rhbz#846725)

This commit is contained in:
Jan Synacek 2012-09-27 14:01:01 +02:00
parent 39fb7e08e8
commit d8a18a9f5b
2 changed files with 26 additions and 0 deletions

22
logwatch-pam_unix.patch Normal file
View File

@ -0,0 +1,22 @@
--- logwatch-svn110-dist/scripts/services/pam_unix 2012-09-27 10:01:34.177205178 +0200
+++ logwatch-svn110-new/scripts/services/pam_unix 2012-09-27 13:39:49.697365083 +0200
@@ -174,7 +174,7 @@
# ignore this line
} elsif ($line =~ s/^authentication failure; .*rhost=(\S*)\s+user=(\S*)$/$2 ($1)/) {
$data{$service}{'Authentication Failures'}{$line}++;
- } elsif ($line =~ s/^authentication failure; .*rhost=(\S*).$/unknown ($1)/) {
+ } elsif ($line =~ s/^authentication failure; .*rhost=(\S*)\s*$/unknown ($1)/) {
$data{$service}{'Authentication Failures'}{$line}++;
} elsif ($line =~ s/^authentication failure; logname=(\S*) uid=(\d+) .*user=(\S*)$/$1($2) -> $3/) {
$data{$service}{'Authentication Failures'}{$line}++;
@@ -227,8 +227,8 @@
if ($line =~ s/^password changed for (.+)/$1/) {
($Detail >= 5) && $data{$service}{'Password changed'}{$line}++;
}
- } elsif (grep $_ eq $service, qw/gdm gdm-password kdm kcheckpass xdm imap dovecot cups/) {
- if ($line =~ s/^session opened for user (.+) by \(uid=\d+\)/$1/) {
+ } elsif (grep $_ eq $service, qw/gdm gdm-password gdm-welcome kdm kcheckpass xdm imap dovecot cups/) {
+ if ($line =~ s/^session opened for user (.+) by (?:\(unknown\))?\(uid=\d+\)/$1/) {
($Detail >= 5) && $data{$service}{'Sessions Opened'}{$line}++;
} elsif ($line =~ s/^authentication failure;.* user=(.+)$/$1/) {
$data{$service}{'Authentication Failures'}{$line}++;

View File

@ -25,11 +25,13 @@ Patch7: logwatch-dovecot.patch
Patch8: logwatch-sshd.patch
# Rootkit Hunter patch - not applied by upstream
Patch9: logwatch-rkhunter.patch
# Patches 10-15 not yet in upstream
Patch10: logwatch-applystddate.patch
Patch11: logwatch-http.patch
Patch12: logwatch-pluto.patch
Patch13: logwatch-xvc.patch
Patch14: logwatch-secure.patch
Patch15: logwatch-pam_unix.patch
Requires: textutils sh-utils grep mailx
Requires: perl(Date::Manip)
Requires: perl(Sys::CPU)
@ -58,6 +60,7 @@ of the package on many systems.
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
rm -f scripts/services/*.orig
%build
@ -150,6 +153,7 @@ echo "# Configuration overrides for specific logfiles/services may be placed her
%changelog
* Thu Sep 27 2012 Jan Synáček <jsynacek@redhat.com> - 7.4.0-17.20120619svn110
- Add secure patch (rhbz#836189)
- Add pam_unix patch (rhbz#836183, rhbz#846725)
* Wed Aug 29 2012 Jan Synáček <jsynacek@redhat.com> - 7.4.0-16.20120619svn110
- Add applystddate patch - support rsyslog timestamps