Commit Graph

10 Commits

Author SHA1 Message Date
Jose Luis Duran
63f6075fcf blacklistd: Whitespace police
These were missed in the previous whitespace reduction.

Fixes:		631bdcf304 ("blacklistd: whitespace cleanup")
Obtained from:	https://github.com/zoulasc/blocklist
2022-10-13 08:47:56 -04:00
Ed Maste
b290769b98 blacklistd: silence sign-conversion warning from Clang
Obtained from:	NetBSD 518a28b2e752
2022-10-12 14:10:21 -04:00
Ed Maste
631bdcf304 blacklistd: whitespace cleanup
Diff reduction against NetBSD external/bsd/blacklist (at commit
03c74c04f277).

Sponsored by:	The FreeBSD Foundation
2022-10-12 13:41:44 -04:00
Jose Luis Duran
aa05c93cb7 blacklistd: Update documentation changes
Cherry-pick upstream documentation changes.

Obtained from:	 https://github.com/zoulasc/blocklist
Differential Revision:	https://reviews.freebsd.org/D36086
2022-10-12 09:27:08 -04:00
Ed Maste
b1e81e6dde blacklistd: Handle 0 sized messages
Patch obtained from https://github.com/zoulasc/blocklist commit
ada75856bc6fcabbdd25ffbe08fbad5cf2a2c08a

PR:		264599
MFC after:	1 week
2022-07-18 08:55:30 -04:00
Ed Maste
e3a90f49ad blacklist: update to NetBSD snapshot on 20191106
Cursory review:	cem
MFC after:	3 months
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D22259
2019-11-06 16:21:35 +00:00
Kurt Lidl
5de2cc52e9 Extend libblacklist support with new action types
The original blacklist library supported two notification types:
 - failed auth attempt, which incremented the failed login count
   by one for the remote address
 - successful auth attempt, which reset the failed login count
   to zero for that remote address

When the failed login count reached the limit in the configuration
file, the remote address would be blocked by a packet filter.

This patch implements a new notification type, "abusive behavior",
and accepts, but does not act on an additional type, "bad username".
It is envisioned that a system administrator will configure a small
list of "known bad usernames" that should be blocked immediately.

Reviewed by:	emaste
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10604
2017-05-23 19:03:07 +00:00
Kurt Lidl
40935b566b Merge latest version of blacklist sources from NetBSD (@ 20170503)
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2017-05-04 19:07:37 +00:00
Kurt Lidl
4e9ac06d0d libblacklist: Do not use %m for logging, use strerror(errno)
The blacklist library can accept a function to use for logging,
defaulting to vsyslog(), if no function is specified.  Make the
blacklist library use strerror(errno) explicitly, instead of %m,
so that the passed in function does not need to support the
syslog specific placeholder.

This matches a change already submitted and accepted upstream.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2016-07-29 21:11:32 +00:00
Kurt Lidl
12017ca883 Import NetBSD's blacklist source from vendor tree
This import includes The basic blacklist library and utility programs,
to add a system-wide packet filtering notification mechanism to
FreeBSD.

The rational behind the daemon was given by Christos Zoulas in a
presentation at vBSDcon 2015: https://youtu.be/fuuf8G28mjs

Reviewed by:	rpaulo
Approved by:	rpaulo
Obtained from:	NetBSD
Relnotes:	YES
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5912
2016-06-01 22:04:10 +00:00