Hi,
On Fri, Mar 22, Tomas Mraz wrote:
The attached patch fixes problem with corruption (short read) of
btmp
file causing pam_lastlog to fail. The corruption should be logged but
otherwise ignored.
OK to commit?
Fine with me.
diff --git a/modules/pam_lastlog/pam_lastlog.c
b/modules/pam_lastlog/pam_lastlog.c
index 50e5a59..bd454ff 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) {
_______________________________________________
Pam-developers mailing list
Pam-developers(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/pam-developers
--
Thorsten Kukuk, Project Manager/Release Manager SLES
SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)