From: Aki Tuomi Date: Fri, 11 Nov 2016 11:40:55 +0000 (+0200) Subject: config: Match local_name using dns-util X-Git-Tag: 2.2.27~141 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e896b5e3d75319050ca0ff5a966afe4797c2e4d;p=thirdparty%2Fdovecot%2Fcore.git config: Match local_name using dns-util This way it correctly handles wildcards. --- diff --git a/src/config/Makefile.am b/src/config/Makefile.am index 5b2166e78b..4861786315 100644 --- a/src/config/Makefile.am +++ b/src/config/Makefile.am @@ -6,6 +6,7 @@ pkglibexec_PROGRAMS = config AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib \ + -I$(top_srcdir)/src/lib-dns \ -I$(top_srcdir)/src/lib-settings \ -I$(top_srcdir)/src/lib-master \ -DPKG_RUNDIR=\""$(rundir)"\" \ diff --git a/src/config/config-filter.c b/src/config/config-filter.c index 87a24da26c..426a32639a 100644 --- a/src/config/config-filter.c +++ b/src/config/config-filter.c @@ -6,6 +6,7 @@ #include "master-service-settings.h" #include "config-parser.h" #include "config-filter.h" +#include "dns-util.h" struct config_filter_context { pool_t pool; @@ -36,7 +37,7 @@ static bool config_filter_match_rest(const struct config_filter *mask, if (mask->local_name != NULL) { if (filter->local_name == NULL) return FALSE; - if (strcasecmp(filter->local_name, mask->local_name) != 0) + if (dns_match_wildcard(filter->local_name, mask->local_name) != 0) return FALSE; } /* FIXME: it's not comparing full masks */