Blame SOURCES/pam-1.1.8-audit-user-mgmt.patch

73cfcf
diff -up Linux-PAM-1.1.8/modules/pam_tally2/pam_tally2.c.audit-user-mgmt Linux-PAM-1.1.8/modules/pam_tally2/pam_tally2.c
73cfcf
--- Linux-PAM-1.1.8/modules/pam_tally2/pam_tally2.c.audit-user-mgmt	2013-06-18 16:11:21.000000000 +0200
73cfcf
+++ Linux-PAM-1.1.8/modules/pam_tally2/pam_tally2.c	2014-10-17 12:09:12.965490940 +0200
73cfcf
@@ -997,9 +997,9 @@ main( int argc UNUSED, char **argv )
73cfcf
 #ifdef HAVE_LIBAUDIT
73cfcf
         char buf[64];
73cfcf
         int audit_fd = audit_open();
73cfcf
-        snprintf(buf, sizeof(buf), "pam_tally2 uid=%u reset=%hu", uid, cline_reset);
73cfcf
-        audit_log_user_message(audit_fd, AUDIT_USER_ACCT,
73cfcf
-                buf, NULL, NULL, ttyname(STDIN_FILENO), 1);
73cfcf
+        snprintf(buf, sizeof(buf), "pam_tally2 reset=%hu", cline_reset);
73cfcf
+        audit_log_acct_message(audit_fd, AUDIT_USER_MGMT, NULL,
73cfcf
+                buf, NULL, uid, NULL, NULL, ttyname(STDIN_FILENO), 1);
73cfcf
         if (audit_fd >=0)
73cfcf
                 close(audit_fd);
73cfcf
 #endif
73cfcf
@@ -1040,11 +1040,10 @@ main( int argc UNUSED, char **argv )
73cfcf
     }
73cfcf
     else if ( !cline_reset ) {
73cfcf
 #ifdef HAVE_LIBAUDIT
73cfcf
-      char buf[64];
73cfcf
       int audit_fd = audit_open();
73cfcf
-      snprintf(buf, sizeof(buf), "pam_tally2 uid=all reset=0");
73cfcf
-      audit_log_user_message(audit_fd, AUDIT_USER_ACCT,
73cfcf
-              buf, NULL, NULL, ttyname(STDIN_FILENO), 1);
73cfcf
+      audit_log_acct_message(audit_fd, AUDIT_USER_MGMT, NULL,
73cfcf
+              "pam_tally2-reset-all-accts reset=0", "*", -1,
73cfcf
+               NULL, NULL, ttyname(STDIN_FILENO), 1);
73cfcf
       if (audit_fd >=0)
73cfcf
               close(audit_fd);
73cfcf
 #endif