2007-08-06 12:31:50 +00:00
|
|
|
diff -up Linux-PAM-0.99.8.1/libpam/pam_audit.c.no-log Linux-PAM-0.99.8.1/libpam/pam_audit.c
|
|
|
|
--- Linux-PAM-0.99.8.1/libpam/pam_audit.c.no-log 2007-07-18 10:53:35.000000000 +0200
|
2007-08-13 09:05:04 +00:00
|
|
|
+++ Linux-PAM-0.99.8.1/libpam/pam_audit.c 2007-08-13 10:59:40.000000000 +0200
|
|
|
|
@@ -42,18 +42,17 @@ _pam_audit_writelog(pam_handle_t *pamh,
|
2007-08-06 12:31:50 +00:00
|
|
|
best to fix it. */
|
|
|
|
errno = -rc;
|
|
|
|
|
2007-08-13 09:05:04 +00:00
|
|
|
- if (rc < 0 && errno != old_errno)
|
|
|
|
- {
|
|
|
|
- old_errno = errno;
|
|
|
|
- pam_syslog (pamh, LOG_CRIT, "audit_log_acct_message() failed: %m");
|
|
|
|
- }
|
2007-08-06 12:31:50 +00:00
|
|
|
-
|
2007-08-13 09:05:04 +00:00
|
|
|
pamh->audit_state |= PAMAUDIT_LOGGED;
|
|
|
|
|
2007-08-06 12:31:50 +00:00
|
|
|
- if (rc == -EPERM && getuid () != 0)
|
|
|
|
- return 0;
|
|
|
|
- else
|
|
|
|
- return rc;
|
2007-08-13 09:05:04 +00:00
|
|
|
+ if (rc < 0) {
|
|
|
|
+ if (rc == -EPERM && getuid() != 0)
|
|
|
|
+ return 0;
|
|
|
|
+ if (errno != old_errno) {
|
|
|
|
+ old_errno = errno;
|
|
|
|
+ pam_syslog (pamh, LOG_CRIT, "audit_log_acct_message() failed: %m");
|
|
|
|
+ }
|
|
|
|
+ }
|
2007-08-06 12:31:50 +00:00
|
|
|
+ return rc;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|