diff options
author | Tomas Mraz <tmraz@fedoraproject.org> | 2013-03-22 13:50:54 +0100 |
---|---|---|
committer | Tomas Mraz <tmraz@fedoraproject.org> | 2013-03-22 13:50:54 +0100 |
commit | 9909a2b6ab99a32853224ae8dc0bb24c018d45e7 (patch) | |
tree | 68eaacea9e4bd7b1aedf3745483d718b4c79090d /modules | |
parent | 74ab2ed83471c2b17c2176d7465f56ae32ae4507 (diff) | |
download | pam-9909a2b6ab99a32853224ae8dc0bb24c018d45e7.tar.gz pam-9909a2b6ab99a32853224ae8dc0bb24c018d45e7.tar.bz2 pam-9909a2b6ab99a32853224ae8dc0bb24c018d45e7.zip |
pam_lastlog: Do not fail on short read if btmp is corrupted.
modules/pam_lastlog/pam_lastlog.c (last_login_failed): Just warn, not fail
on short read or read error.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/pam_lastlog/pam_lastlog.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/pam_lastlog/pam_lastlog.c b/modules/pam_lastlog/pam_lastlog.c index 50e5a59c..bd454ffd 100644 --- a/modules/pam_lastlog/pam_lastlog.c +++ b/modules/pam_lastlog/pam_lastlog.c @@ -479,6 +479,10 @@ last_login_failed(pam_handle_t *pamh, int announce, const char *user, time_t llt } } + if (retval != 0) + pam_syslog(pamh, LOG_WARNING, "corruption detected in %s", _PATH_BTMP); + retval = PAM_SUCCESS; + if (failed) { /* we want the date? */ if (announce & LASTLOG_DATE) { |