From e7b758465fef27cf5f6ec2e0453a93663b116bf0 Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Mon, 23 Sep 2024 13:29:35 +0300 Subject: [PATCH] Allow setting -BlacklistThreshold to 0 to disable it --- common/rfb/Blacklist.cxx | 3 +++ unix/xserver/hw/vnc/Xvnc.man | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/rfb/Blacklist.cxx b/common/rfb/Blacklist.cxx index 4590bef..389bc88 100644 --- a/common/rfb/Blacklist.cxx +++ b/common/rfb/Blacklist.cxx @@ -42,6 +42,9 @@ Blacklist::~Blacklist() { } bool Blacklist::isBlackmarked(const char* name) { + if (!threshold) + return false; + BlacklistMap::iterator i = blm.find(name); if (i == blm.end()) { // Entry is not already black-marked. diff --git a/unix/xserver/hw/vnc/Xvnc.man b/unix/xserver/hw/vnc/Xvnc.man index 54cbb63..c23bccd 100644 --- a/unix/xserver/hw/vnc/Xvnc.man +++ b/unix/xserver/hw/vnc/Xvnc.man @@ -478,7 +478,7 @@ See the GnuTLS manual for possible values. Default is \fBNORMAL\fP. .TP .B \-BlacklistThreshold \fIcount\fP The number of unauthenticated connection attempts allowed from any individual -host before that host is black-listed. Default is 5. +host before that host is black-listed. Default is 5. Set to 0 to disable. . .TP .B \-BlacklistTimeout \fIseconds\fP