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

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