Incorrect behavior for multiple tries of login
"Dan Nicholson" <[email protected]> Sun, 9 Jul 2006 18:30:51 -0700
| Newsgroups | gmane.linux.pld.shadow.general |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_22700_1287165.1152495051041 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, login has slightly incorrect behavior when a user tries to login repeatedly when using PAM. If the user enters the correct password on the final attempt when failcount == retries, login fails with the message "Maximum number of tries exceeded". The problem is that login doesn't test for PAM_SUCCESS when testing failcount >= retries. Attached is a patch to fix this problem. This was tested against shadow-4.0.15. I haven't tested against 4.0.16 or CVS HEAD, but looking at the source, it doesn't seem to be different. Also, would it be a problem to add the address in the Cc: field to a whitelist? He brought this issue to my attention and created the patch. He says that he tried to subscribe to your list but his mail server is blacklisted. Thanks. -- Dan ------=_Part_22700_1287165.1152495051041 Content-Type: text/x-patch; name=login_retries.patch; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 X-Attachment-Id: f_epg5mbq1 Content-Disposition: attachment; filename="login_retries.patch" ZGlmZiAtTmF1ciBzaGFkb3ctNC4wLjE1Lm9yaWcvc3JjL2xvZ2luLmMgc2hhZG93LTQuMC4xNS9z cmMvbG9naW4uYwotLS0gc2hhZG93LTQuMC4xNS5vcmlnL3NyYy9sb2dpbi5jCTIwMDYtMDMtMDcg MTU6NTA6MzMuMDAwMDAwMDAwICswMDAwCisrKyBzaGFkb3ctNC4wLjE1L3NyYy9sb2dpbi5jCTIw MDYtMDctMDggMTk6NTI6NDAuMDAwMDAwMDAwICswMDAwCkBAIC02NjIsNyArNjYyLDkgQEAKIAkJ CSAgICBmYWlsZW50X3VzZXIgPSAiVU5LTk9XTiI7CiAJCQkgIH0KIAotCQkJICBpZiAocmV0Y29k ZSA9PSBQQU1fTUFYVFJJRVMgfHwgZmFpbGNvdW50ID49IHJldHJpZXMpIHsKKwkJCSAgaWYgKHJl dGNvZGUgPT0gUEFNX01BWFRSSUVTCisJCQkgICAgICB8fCByZXRjb2RlICE9IFBBTV9TVUNDRVNT ICYmIGZhaWxjb3VudCA+PSByZXRyaWVzKQorCQkJICB7CiAJCQkgICAgU1lTTE9HICgoTE9HX05P VElDRSwKIAkJCQkgICAgIlRPTyBNQU5ZIExPR0lOIFRSSUVTICglZCklcyBGT1IgYCVzJyIsCiAJ CQkJICAgIGZhaWxjb3VudCwgZnJvbWhvc3QsIGZhaWxlbnRfdXNlcikpOwo= ------=_Part_22700_1287165.1152495051041 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline