|
|
b10636 |
diff -urp Linux-PAM-1.1.8.orig/modules/pam_faillock/main.c Linux-PAM-1.1.8/modules/pam_faillock/main.c
|
|
|
b10636 |
--- Linux-PAM-1.1.8.orig/modules/pam_faillock/main.c 2014-10-16 10:12:57.117554380 -0400
|
|
|
b10636 |
+++ Linux-PAM-1.1.8/modules/pam_faillock/main.c 2014-10-16 10:38:00.199510093 -0400
|
|
|
b10636 |
@@ -141,10 +141,8 @@ do_user(struct options *opts, const char
|
|
|
b10636 |
if ((audit_fd=audit_open()) >= 0) {
|
|
|
b10636 |
|
|
|
b10636 |
if (pwd != NULL) {
|
|
|
b10636 |
- snprintf(buf, sizeof(buf), "faillock reset uid=%u",
|
|
|
b10636 |
- pwd->pw_uid);
|
|
|
b10636 |
- audit_log_user_message(audit_fd, AUDIT_USER_ACCT,
|
|
|
b10636 |
- buf, NULL, NULL, NULL, rv == 0);
|
|
|
b10636 |
+ audit_log_acct_message(audit_fd, AUDIT_USER_MGMT, NULL,
|
|
|
b10636 |
+ "faillock-reset", NULL, pwd->pw_uid, NULL, NULL, NULL, rv == 0);
|
|
|
b10636 |
}
|
|
|
b10636 |
close(audit_fd);
|
|
|
b10636 |
}
|
|
|
b10636 |
diff -urp Linux-PAM-1.1.8.orig/modules/pam_tally2/pam_tally2.c Linux-PAM-1.1.8/modules/pam_tally2/pam_tally2.c
|
|
|
b10636 |
--- Linux-PAM-1.1.8.orig/modules/pam_tally2/pam_tally2.c 2013-06-18 10:11:21.000000000 -0400
|
|
|
b10636 |
+++ Linux-PAM-1.1.8/modules/pam_tally2/pam_tally2.c 2014-10-16 10:37:05.072511717 -0400
|
|
|
b10636 |
@@ -997,9 +997,9 @@ main( int argc UNUSED, char **argv )
|
|
|
b10636 |
#ifdef HAVE_LIBAUDIT
|
|
|
b10636 |
char buf[64];
|
|
|
b10636 |
int audit_fd = audit_open();
|
|
|
b10636 |
- snprintf(buf, sizeof(buf), "pam_tally2 uid=%u reset=%hu", uid, cline_reset);
|
|
|
b10636 |
- audit_log_user_message(audit_fd, AUDIT_USER_ACCT,
|
|
|
b10636 |
- buf, NULL, NULL, ttyname(STDIN_FILENO), 1);
|
|
|
b10636 |
+ snprintf(buf, sizeof(buf), "pam_tally2 reset=%hu", cline_reset);
|
|
|
b10636 |
+ audit_log_acct_message(audit_fd, AUDIT_USER_MGMT, NULL,
|
|
|
b10636 |
+ buf, NULL, uid, NULL, NULL, ttyname(STDIN_FILENO), 1);
|
|
|
b10636 |
if (audit_fd >=0)
|
|
|
b10636 |
close(audit_fd);
|
|
|
b10636 |
#endif
|
|
|
b10636 |
@@ -1040,11 +1040,10 @@ main( int argc UNUSED, char **argv )
|
|
|
b10636 |
}
|
|
|
b10636 |
else if ( !cline_reset ) {
|
|
|
b10636 |
#ifdef HAVE_LIBAUDIT
|
|
|
b10636 |
- char buf[64];
|
|
|
b10636 |
int audit_fd = audit_open();
|
|
|
b10636 |
- snprintf(buf, sizeof(buf), "pam_tally2 uid=all reset=0");
|
|
|
b10636 |
- audit_log_user_message(audit_fd, AUDIT_USER_ACCT,
|
|
|
b10636 |
- buf, NULL, NULL, ttyname(STDIN_FILENO), 1);
|
|
|
b10636 |
+ audit_log_acct_message(audit_fd, AUDIT_USER_MGMT, NULL,
|
|
|
b10636 |
+ "pam_tally2-reset-all-accts reset=0", "*", -1,
|
|
|
b10636 |
+ NULL, NULL, ttyname(STDIN_FILENO), 1);
|
|
|
b10636 |
if (audit_fd >=0)
|
|
|
b10636 |
close(audit_fd);
|
|
|
b10636 |
#endif
|