HomeFreeBSD

Reset failed login count to zero when removing a blocked address

Description

Reset failed login count to zero when removing a blocked address

The blacklistd daemon keeps records of failed login attempts for
each address:port that is flagged as a failed login. When a
successful login occurs for that address:port combination,
the record's last update time is set to zero, to indicate no current
failed login attempts.

Reset the failed login count to zero, so that at the next failed
login attempt, the counting will restart properly at zero. Without
this reset to zero, the first failed login after a successful login
will cause the address to be blocked immediately.

When debugging is turned on, output more information about database
state before and after the database updates have occured.

A similar patch has already been upstreamed to NetBSD.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

Details

Provenance
lidlAuthored on
Parents
rS314119: Do not check divider length if we have a div table.
Branches
Unknown
Tags
Unknown