From 2935385bf276e8d26b1fe092e91c79505618129a Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sun, 9 Sep 2018 09:49:03 +0200 Subject: [PATCH] allow::options::sasl has been removed. Use the new and more flexible require sasl { } block instead. --- doc/RELEASE-NOTES | 4 ++++ include/struct.h | 1 - src/modules/m_nick.c | 2 -- src/s_conf.c | 11 ++++++++--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/doc/RELEASE-NOTES b/doc/RELEASE-NOTES index 6a186ac66..cdbabce19 100644 --- a/doc/RELEASE-NOTES +++ b/doc/RELEASE-NOTES @@ -75,6 +75,10 @@ Minor issues fixed: (and possibly other Linux distributions as well) * Timeouts during server linking attempts were not displayed. +Removed: +* allow::options::sasl has been removed. Use the new and more flexible + require sasl { } block instead. + Other changes: * Windows users may be prompted to install the Visual C++ redistributable package for Visual Studio 2017. This is because we now build on VS 2017 diff --git a/include/struct.h b/include/struct.h index fbb16f361..85f5cb11f 100644 --- a/include/struct.h +++ b/include/struct.h @@ -1042,7 +1042,6 @@ struct _configflag_allow { unsigned useip :1; unsigned ssl :1; unsigned nopasscont :1; - unsigned sasl :1; }; struct _configitem_allow { diff --git a/src/modules/m_nick.c b/src/modules/m_nick.c index 1082406a8..1d6227a72 100644 --- a/src/modules/m_nick.c +++ b/src/modules/m_nick.c @@ -1704,8 +1704,6 @@ int AllowClient(aClient *cptr, struct hostent *hp, char *sockhost, char *usernam continue; if (aconf->flags.ssl && !IsSecure(cptr)) continue; - if (aconf->flags.sasl && (!*cptr->user->svid || isdigit(*cptr->user->svid))) - continue; if (hp && hp->h_name) { hname = hp->h_name; diff --git a/src/s_conf.c b/src/s_conf.c index 5cf024756..c09da718d 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -4980,8 +4980,6 @@ int _conf_allow(ConfigFile *conf, ConfigEntry *ce) allow->flags.useip = 1; else if (!strcmp(cepp->ce_varname, "ssl")) allow->flags.ssl = 1; - else if (!strcmp(cepp->ce_varname, "sasl")) - allow->flags.sasl = 1; else if (!strcmp(cepp->ce_varname, "nopasscont")) allow->flags.nopasscont = 1; } @@ -5182,7 +5180,14 @@ int _test_allow(ConfigFile *conf, ConfigEntry *ce) else if (!strcmp(cepp->ce_varname, "ssl")) {} else if (!strcmp(cepp->ce_varname, "sasl")) - {} + { + config_error("%s:%d: The option allow::options::sasl no longer exists. " + "Please use a require sasl { } block instead, which " + "is more flexible and provides the same functionality. See " + "https://www.unrealircd.org/docs/Require_sasl_block", + cepp->ce_fileptr->cf_filename, cepp->ce_varlinenum); + errors++; + } else if (!strcmp(cepp->ce_varname, "nopasscont")) {} else