diff options
author | Tomas Mraz <tm@t8m.info> | 2008-02-21 21:12:30 +0000 |
---|---|---|
committer | Tomas Mraz <tm@t8m.info> | 2008-02-21 21:12:30 +0000 |
commit | 6ccbba1cf178e9de46347e2f9df76f69aebcec20 (patch) | |
tree | d1d8b61899152d201746f7a949208767370af590 /libpam | |
parent | 9058692366a17701a67d4a5c2eb306acfc778bd6 (diff) | |
download | pam-6ccbba1cf178e9de46347e2f9df76f69aebcec20.tar.gz pam-6ccbba1cf178e9de46347e2f9df76f69aebcec20.tar.bz2 pam-6ccbba1cf178e9de46347e2f9df76f69aebcec20.zip |
Relevant BUGIDs: rhbz#433459
Purpose of commit: bugfix
Commit summary:
---------------
2008-02-21 Tomas Mraz <t8m@centrum.cz>
* libpam/pam_audit.c (_pam_audit_writelog): Silence syslog
message on non-error return.
* modules/pam_unix/unix_chkpwd.c (main): Proceed as unprivileged
user when checking password of another user.
* modules/pam_unix/unix_update.c: Fix comment.
Diffstat (limited to 'libpam')
-rw-r--r-- | libpam/pam_audit.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/libpam/pam_audit.c b/libpam/pam_audit.c index 6fd6a0c1..7f2e0b2c 100644 --- a/libpam/pam_audit.c +++ b/libpam/pam_audit.c @@ -43,18 +43,17 @@ _pam_audit_writelog(pam_handle_t *pamh, int audit_fd, int type, best to fix it. */ errno = -rc; - if (rc < 0 && errno != old_errno) - { - old_errno = errno; - 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; + 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"); + } + } + return rc; } static int |