pam/pam-0.99.3.0-tally-fail-close.patch
Tomáš Mráz fbfca3562b - upgrade to new upstream version
- make pam_console_apply not dependent on glib
- support large uids in pam_tally, pam_tally2
2006-05-10 14:16:34 +00:00

27 lines
801 B
Diff

--- Linux-PAM-0.99.3.0/modules/pam_tally/pam_tally.c.fail-close 2005-09-21 15:35:29.000000000 +0200
+++ Linux-PAM-0.99.3.0/modules/pam_tally/pam_tally.c 2006-05-04 13:31:59.000000000 +0200
@@ -318,6 +318,7 @@
}
lstat_ret = fstat(fileno(*TALLY),&fileinfo);
fclose(*TALLY);
+ *TALLY = NULL;
}
if ( lstat_ret ) {
@@ -348,6 +349,7 @@
if ( fseek( *TALLY, uid * sizeof(struct faillog), SEEK_SET ) ) {
pam_syslog(pamh, LOG_ALERT, "fseek failed for %s", filename);
fclose(*TALLY);
+ *TALLY = NULL;
return PAM_AUTH_ERR;
}
@@ -394,6 +396,7 @@
}
if ( fclose(*TALLY) ) {
+ *TALLY = NULL;
pam_syslog(pamh, LOG_ALERT, "update (fclose) failed for %s", filename);
return PAM_AUTH_ERR;
}