summaryrefslogtreecommitdiffstats
path: root/testing/source/PAM/a/pam/fedora-patches/pam-1.1.8-audit-user-mgmt.patch
blob: 277a5699f3ce04436235aa498f26f963fc328156 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
--- Linux-PAM-1.1.8/modules/pam_tally2/pam_tally2.c.audit-user-mgmt	2013-06-18 16:11:21.000000000 +0200
+++ Linux-PAM-1.1.8/modules/pam_tally2/pam_tally2.c	2014-10-17 12:09:12.965490940 +0200
@@ -997,9 +997,9 @@ main( int argc UNUSED, char **argv )
 #ifdef HAVE_LIBAUDIT
         char buf[64];
         int audit_fd = audit_open();
-        snprintf(buf, sizeof(buf), "pam_tally2 uid=%u reset=%hu", uid, cline_reset);
-        audit_log_user_message(audit_fd, AUDIT_USER_ACCT,
-                buf, NULL, NULL, ttyname(STDIN_FILENO), 1);
+        snprintf(buf, sizeof(buf), "pam_tally2 reset=%hu", cline_reset);
+        audit_log_acct_message(audit_fd, AUDIT_USER_MGMT, NULL,
+                buf, NULL, uid, NULL, NULL, ttyname(STDIN_FILENO), 1);
         if (audit_fd >=0)
                 close(audit_fd);
 #endif
@@ -1040,11 +1040,10 @@ main( int argc UNUSED, char **argv )
     }
     else if ( !cline_reset ) {
 #ifdef HAVE_LIBAUDIT
-      char buf[64];
       int audit_fd = audit_open();
-      snprintf(buf, sizeof(buf), "pam_tally2 uid=all reset=0");
-      audit_log_user_message(audit_fd, AUDIT_USER_ACCT,
-              buf, NULL, NULL, ttyname(STDIN_FILENO), 1);
+      audit_log_acct_message(audit_fd, AUDIT_USER_MGMT, NULL,
+              "pam_tally2-reset-all-accts reset=0", "*", -1,
+               NULL, NULL, ttyname(STDIN_FILENO), 1);
       if (audit_fd >=0)
               close(audit_fd);
 #endif