
pwauth - issue #4
MAX_FAIL_COUNT not working with FAILLOG_PWAUTH (and maybe with FAILLOG_OPENBSD)
== Reproducing the Issue == What steps will reproduce the problem?
Modify config.h with the following: Uncomment #define FAILLOG_PWAUTH Uncomment #define MAX_FAIL_COUNT and change the value from 40 to 3. Uncomment #define RESET_FAIL_COUNT
Compile with 'make'.
== Expected and Observed Results == What is the expected output? What do you see instead?
After giving the wrong password for a user 3 times, I should receive exit status 7 when I enter the password correctly.
Instead, pwauth gave me exit status 0. The MAX_FAIL_COUNT was not working with FAILLOG_PWAUTH. Based on what I saw in the code, I don't think it will work with FAILLOG_OPENBSD either, but I did not test that configuration.
== Software Versions == What version of the product are you using? On what operating system?
pwauth 2.3.10 ubuntu
== Proposed Solution ==
To make it work, I did the following:
a) In main.c, change line 110 to be: #if defined(FAILLOG_JFH) || defined(FAILLOG_OPENBSD) || defined(FAILLOG_PWAUTH)
b) In fail_log.c, change line 132 to be: result= (flog.count < MAX_FAIL_COUNT);
c) In fail_log.c, change line 135 to be: if (result && flog.count > 0)
Comment #1
Posted on Dec 12, 2013 by Happy WombatWow. How did that get past me?
Thanks for the fixes - they are in the svn archive and will be in the 2.3.11 release.
Status: Fixed
Labels:
Type-Defect
Priority-Medium