pam/pam-0.99.8.1-audit-no-log.patch
Tomáš Mráz 8fa0463a67 - updated db4 to 4.6.18 (#249740)
- added user and new instance parameters to namespace init
- document the new features of pam_namespace
- do not log an audit error when uid != 0 (#249870)
2007-08-06 12:31:50 +00:00

28 lines
765 B
Diff

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
+++ Linux-PAM-0.99.8.1/libpam/pam_audit.c 2007-08-06 11:38:08.000000000 +0200
@@ -42,18 +42,16 @@ _pam_audit_writelog(pam_handle_t *pamh,
best to fix it. */
errno = -rc;
+ pamh->audit_state |= PAMAUDIT_LOGGED;
+
if (rc < 0 && errno != old_errno)
{
old_errno = errno;
+ if (rc == -EPERM && getuid () != 0)
+ return 0;
pam_syslog (pamh, LOG_CRIT, "audit_log_acct_message() failed: %m");
}
-
- pamh->audit_state |= PAMAUDIT_LOGGED;
-
- if (rc == -EPERM && getuid () != 0)
- return 0;
- else
- return rc;
+ return rc;
}
int