Fix 'w' wildcard expansion regressio in last release
Upstream maptolower and maptoupper did not contain w character. It makes response mangled, replacing 'w' and 'W' characters with '\0' in answer. Resolves: rhbz#1973587
This commit is contained in:
parent
83399543c1
commit
2c4a614d01
37
bind-9.16-maptolower-w.patch
Normal file
37
bind-9.16-maptolower-w.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From 52cc9ff372ba637289d1e8f35d1f3f35d46ea25f Mon Sep 17 00:00:00 2001
|
||||
From: Mark Andrews <marka@isc.org>
|
||||
Date: Fri, 18 Jun 2021 11:29:45 +1000
|
||||
Subject: [PATCH] Add w and W to maptoupper and maptolower tables
|
||||
|
||||
(cherry picked from commit 08eeebb6a7ef45ac796a0df47a92350473a4e0b8)
|
||||
---
|
||||
lib/dns/rbtdb.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c
|
||||
index 223194a6d6..9dfd219dce 100644
|
||||
--- a/lib/dns/rbtdb.c
|
||||
+++ b/lib/dns/rbtdb.c
|
||||
@@ -9890,7 +9890,8 @@ static const unsigned char maptolower[256] = {
|
||||
['F'] = 'f', ['G'] = 'g', ['H'] = 'h', ['I'] = 'i', ['J'] = 'j',
|
||||
['K'] = 'k', ['L'] = 'l', ['M'] = 'm', ['N'] = 'n', ['O'] = 'o',
|
||||
['P'] = 'p', ['Q'] = 'q', ['R'] = 'r', ['S'] = 's', ['T'] = 't',
|
||||
- ['U'] = 'u', ['V'] = 'v', ['X'] = 'x', ['Y'] = 'y', ['Z'] = 'z',
|
||||
+ ['U'] = 'u', ['V'] = 'v', ['W'] = 'w', ['X'] = 'x', ['Y'] = 'y',
|
||||
+ ['Z'] = 'z',
|
||||
};
|
||||
|
||||
static const unsigned char maptoupper[256] = {
|
||||
@@ -9898,7 +9899,8 @@ static const unsigned char maptoupper[256] = {
|
||||
['f'] = 'F', ['g'] = 'G', ['h'] = 'H', ['i'] = 'I', ['j'] = 'J',
|
||||
['k'] = 'K', ['l'] = 'L', ['m'] = 'M', ['n'] = 'N', ['o'] = 'O',
|
||||
['p'] = 'P', ['q'] = 'Q', ['r'] = 'R', ['s'] = 'S', ['t'] = 'T',
|
||||
- ['u'] = 'U', ['v'] = 'V', ['x'] = 'X', ['y'] = 'Y', ['z'] = 'Z',
|
||||
+ ['u'] = 'U', ['v'] = 'V', ['w'] = 'W', ['x'] = 'X', ['y'] = 'Y',
|
||||
+ ['z'] = 'Z',
|
||||
};
|
||||
|
||||
static void
|
||||
--
|
||||
2.31.1
|
||||
|
58
bind-9.16-test-wildcard-expansion
Normal file
58
bind-9.16-test-wildcard-expansion
Normal file
@ -0,0 +1,58 @@
|
||||
From ab597b8b91de5f9c6d6b0da410e8a0350876f484 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Andrews <marka@isc.org>
|
||||
Date: Fri, 18 Jun 2021 13:02:46 +1000
|
||||
Subject: [PATCH] Check wild card expansions by code point
|
||||
|
||||
(cherry picked from commit c65dc2f7dc211358d5e28ff368cd60ddf5d5dcd4)
|
||||
---
|
||||
bin/tests/system/wildcard/tests.sh | 35 ++++++++++++++++++++++++++++++
|
||||
1 file changed, 35 insertions(+)
|
||||
|
||||
diff --git a/bin/tests/system/wildcard/tests.sh b/bin/tests/system/wildcard/tests.sh
|
||||
index 439f8f1eff..0cf2189223 100644
|
||||
--- a/bin/tests/system/wildcard/tests.sh
|
||||
+++ b/bin/tests/system/wildcard/tests.sh
|
||||
@@ -231,5 +231,40 @@ grep "ANSWER: 0," dig.out.ns1.test$n > /dev/null || ret=1
|
||||
if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
status=`expr $status + $ret`
|
||||
|
||||
+n=`expr $n + 1`
|
||||
+echo_i "check wild card expansions by code point ($n)"
|
||||
+ret=0
|
||||
+i=0
|
||||
+while test $i -lt 256
|
||||
+do
|
||||
+ x=`expr 00$i : '.*\(...\)$'`
|
||||
+ $DIG $DIGOPTS @10.53.0.1 "\\$x.example" TXT > dig.out.ns1.$x.test$n
|
||||
+ if test $i -le 32 -o $i -ge 127
|
||||
+ then
|
||||
+ grep '^\\'"$x"'\.example\..*TXT.*\"this is a wildcard\"$' dig.out.ns1.$x.test$n > /dev/null || { echo_i "code point $x failed" ; ret=1; }
|
||||
+ # "=34 $=36 (=40 )=41 .=46 ;=59 \=92 @=64
|
||||
+ elif test $i -eq 34 -o $i -eq 36 -o $i -eq 40 -o $i -eq 41 -o \
|
||||
+ $i -eq 46 -o $i -eq 59 -o $i -eq 64 -o $i -eq 92
|
||||
+ then
|
||||
+ case $i in
|
||||
+ 34) a='"';;
|
||||
+ 36) a='$';;
|
||||
+ 40) a='(';;
|
||||
+ 41) a=')';;
|
||||
+ 46) a='\.';;
|
||||
+ 59) a=';';;
|
||||
+ 64) a='@';;
|
||||
+ 92) a='\\';;
|
||||
+ *) a=''; echo_i "code point $x failed" ; ret=1 ;;
|
||||
+ esac
|
||||
+ grep '^\\'"$a"'\.example.*.*TXT.*"this is a wildcard"$' dig.out.ns1.$x.test$n > /dev/null || { echo_i "code point $x failed" ; ret=1; }
|
||||
+ else
|
||||
+ grep '^\\' dig.out.ns1.$x.test$n && { echo_i "code point $x failed" ; ret=1; }
|
||||
+ fi
|
||||
+ i=`expr $i + 1`
|
||||
+done
|
||||
+if [ $ret != 0 ]; then echo_i "failed"; fi
|
||||
+status=`expr $status + $ret`
|
||||
+
|
||||
echo_i "exit status: $status"
|
||||
[ $status -eq 0 ] || exit 1
|
||||
--
|
||||
2.31.1
|
||||
|
10
bind.spec
10
bind.spec
@ -62,7 +62,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
|
||||
Name: bind
|
||||
License: MPLv2.0
|
||||
Version: 9.16.17
|
||||
Release: 1%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
|
||||
Release: 2%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
|
||||
Epoch: 32
|
||||
Url: https://www.isc.org/downloads/bind/
|
||||
#
|
||||
@ -113,6 +113,9 @@ Patch157:bind-9.11-fips-tests.patch
|
||||
Patch164:bind-9.11-rh1666814.patch
|
||||
Patch170:bind-9.11-feature-test-named.patch
|
||||
Patch171:bind-9.11-tests-variants.patch
|
||||
# https://gitlab.isc.org/isc-projects/bind9/-/issues/2779
|
||||
Patch172:bind-9.16-maptolower-w.patch
|
||||
Patch173:bind-9.16-test-wildcard-expansion
|
||||
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
@ -416,6 +419,8 @@ in HTML and PDF format.
|
||||
%patch164 -p1 -b .rh1666814
|
||||
%patch170 -p1 -b .featuretest-named
|
||||
%patch171 -p1 -b .test-variant
|
||||
%patch172 -p1 -b .rh1973587
|
||||
%patch173 -p1 -b .rh1973587
|
||||
|
||||
%if %{with PKCS11}
|
||||
%patch135 -p1 -b .config-pkcs11
|
||||
@ -1136,6 +1141,9 @@ fi;
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Jun 18 2021 Petr Menšík <pemensik@redhat.com> - 32:9.16.17-2
|
||||
- Fix wildcard expansion not working with 'w' (#1973587)
|
||||
|
||||
* Thu Jun 17 2021 Petr Menšík <pemensik@redhat.com> - 32:9.16.17-1
|
||||
- Update to 9.16.17
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user