pam_unix patch

Ivana Varekova <[email protected]>
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
/I'm going through fedora logwatch patches and this one is not in /
/upstream branch so I'm sending it here.

//Ivana Varekova
/

_______________________________________________
Logwatch-Devel mailing list
[email protected]
http://www2.list.logwatch.org:81/mailman/listinfo/logwatch-devel
pam_unix.patch (text/x-patch, 2.7 KB)
diff -up ./pam_unix.orig ./pam_unix
--- ./pam_unix.orig	2009-04-20 16:20:25.000000000 +0200
+++ ./pam_unix	2009-04-22 08:07:56.000000000 +0200
@@ -177,6 +177,8 @@ while ($line = <STDIN>) {
          $data{$service}{'Expired Accounts'}{$line}++;
       } elsif ($line =~ s/bad username \[(.*)\]/$1/) {
          $data{$service}{'Invalid Users'}{"Bad User: $line"}++;
+      } elsif ($line =~ s/auth could not identify password for \[(.*)\]/$1/) {
+         $data{$service}{'Not Identify Password For'}{$line}++;
       } else {
          $data{$service}{'Unknown Entries'}{$line}++;
       }
@@ -205,8 +207,12 @@ while ($line = <STDIN>) {
          ($Detail >= 5) && $data{$service}{'Sessions Opened'}{$line}++;
       } elsif ($line =~ s/^authentication failure;.* user=(.+)$/$1/) {
          $data{$service}{'Authentication Failures'}{$line}++;
+      } elsif ($line =~ s/auth could not identify password for \[(.*)\]/$1/) {
+         $data{$service}{'Not Identify Password For'}{$line}++;
       } elsif ($line =~ /session closed for user/) {
          # ignore this line
+      } elsif ($line =~ /conversation failed/) {
+         # ignore this line
       } else {
          $data{$service}{'Unknown Entries'}{$line}++;
       }
@@ -246,7 +252,7 @@ while ($line = <STDIN>) {
 		   ($Detail >= 5) && $data{$service}{'Sessions Opened'}{$line}++;
 	   } elsif ($line =~ /session closed for user/) {
 		   # ignore this line
-	   } elsif ($line =~ /^account root has password changed in future/) {
+	   } elsif ($line =~ /^account (.+) has password changed in future/) {
 	          #I'm not sure whether this info could not be reported
 	   } else {
 		   $data{$service}{'Unknown Entries'}{$line}++;
@@ -285,6 +291,24 @@ while ($line = <STDIN>) {
      } else {
          $data{$service}{'Unknown Entries'}{$line}++;
      }
+   } elsif ($service eq 'polkit') {
+     if ($line =~ s/auth could not identify password for \[(.*)\]/$1/) {
+         $data{$service}{'Not Identify Password For'}{$line}++;
+     } elsif ($line =~ s/^authentication failure; logname=(\S*) uid=(\d+) .*user=(\S*)$/$1($2) -> $3/) {
+         $data{$service}{'Authentication Failures'}{$line}++;
+     } elsif ($line =~ /conversation failed/) {
+         # ignore this line
+     } else {
+        $data{$service}{'Unknown Entries'}{$line}++;
+     }
+   } elsif ($service eq 'virt-manager') {
+     if ($line =~ s/auth could not identify password for \[(.*)\]/$1/) {
+        $data{$service}{'Not Identify Password For'}{$line}++;
+     } elsif ($line =~ /conversation failed/) {
+        # ignore this line
+     } else {
+        $data{$service}{'Unknown Entries'}{$line}++;
+     }
    } else {      
       $data{$service}{'Unknown Entries'}{$line}++;
    }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.