Compilable 9.16.1 package

Updated from 9.14 to 9.16.1.
Disabled SIGCHASE, since it no longer exists.
Disabled PKCS11 native build for now
Disabled EXPORT_LIBS

No longer ships isc-config.sh, missing it.
This commit is contained in:
Petr Menšík 2020-03-26 21:46:02 +01:00
parent 05dbc88928
commit b626a2bfa5
12 changed files with 109 additions and 240 deletions

2
.gitignore vendored
View File

@ -103,3 +103,5 @@ bind-9.7.2b1.tar.gz
/bind-9.11.13.tar.gz.asc
/bind-9.11.14.tar.gz
/bind-9.11.14.tar.gz.asc
/bind-9.16.1.tar.xz
/bind-9.16.1.tar.xz.asc

View File

@ -1,4 +1,4 @@
From 36e3d1b08f697190b259a8421472ec16b52315b5 Mon Sep 17 00:00:00 2001
From df27b2a23a195f844687c424a9117d4da14bc6dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Wed, 30 Jan 2019 14:37:17 +0100
Subject: [PATCH] Create feature-test in source directory
@ -12,19 +12,19 @@ compile feature-test for each of them this way.
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/bin/named/Makefile.in b/bin/named/Makefile.in
index 4e8006d..eecfa76 100644
index dd25774..cb187e5 100644
--- a/bin/named/Makefile.in
+++ b/bin/named/Makefile.in
@@ -83,7 +83,7 @@ NOSYMLIBS = ${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \
@@ -87,7 +87,7 @@ NOSYMLIBS = ${NSLIBS} ${DNSLIBS} ${BIND9LIBS} \
SUBDIRS = unix
-TARGETS = named@EXEEXT@
+TARGETS = named@EXEEXT@ feature-test@EXEEXT@
GEOIPLINKOBJS = geoip.@O@
GEOIP2LINKOBJS = geoip.@O@
@@ -154,6 +154,15 @@ named@EXEEXT@: ${OBJS} ${DEPLIBS}
@@ -156,6 +156,15 @@ named@EXEEXT@: ${OBJS} ${DEPLIBS}
export BASEOBJS="${OBJS} ${UOBJS}"; \
${FINALBUILDCMD}
@ -41,10 +41,10 @@ index 4e8006d..eecfa76 100644
docclean manclean maintainer-clean::
diff --git a/bin/tests/system/conf.sh.in b/bin/tests/system/conf.sh.in
index c713d96..20366e5 100644
index 0d83fdf..be4123b 100644
--- a/bin/tests/system/conf.sh.in
+++ b/bin/tests/system/conf.sh.in
@@ -34,7 +34,7 @@ DELV=$TOP/bin/delv/delv
@@ -37,7 +37,7 @@ DELV=$TOP/bin/delv/delv
DIG=$TOP/bin/dig/dig
DNSTAPREAD=$TOP/bin/tools/dnstap-read
DSFROMKEY=$TOP/bin/dnssec/dnssec-dsfromkey
@ -54,5 +54,5 @@ index c713d96..20366e5 100644
IMPORTKEY=$TOP/bin/dnssec/dnssec-importkey
JOURNALPRINT=$TOP/bin/tools/named-journalprint
--
2.20.1
2.21.1

View File

@ -1,4 +1,4 @@
From 11d42f5d851881fd559a716df78a18dba1d6975d Mon Sep 17 00:00:00 2001
From 3f9d05b72f725defd1452fd3d4b8ef3192e96c0b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Thu, 2 Aug 2018 23:46:45 +0200
Subject: [PATCH] FIPS tests changes
@ -549,10 +549,10 @@ index 21be03e..e57c308 100644
};
diff --git a/bin/tests/system/checkconf/good.conf b/bin/tests/system/checkconf/good.conf
index d627d2a..9d0322a 100644
index 2eb2850..9e6913d 100644
--- a/bin/tests/system/checkconf/good.conf
+++ b/bin/tests/system/checkconf/good.conf
@@ -157,6 +157,6 @@ dyndb "name" "library.so" {
@@ -197,6 +197,6 @@ dyndb "name" "library.so" {
system;
};
key "mykey" {
@ -561,19 +561,19 @@ index d627d2a..9d0322a 100644
secret "qwertyuiopasdfgh";
};
diff --git a/bin/tests/system/feature-test.c b/bin/tests/system/feature-test.c
index ff92ad2..746e022 100644
index 204d612..684fab6 100644
--- a/bin/tests/system/feature-test.c
+++ b/bin/tests/system/feature-test.c
@@ -19,6 +19,7 @@
@@ -14,6 +14,7 @@
#include <string.h>
#include <unistd.h>
+#include <isc/md.h>
#include <isc/net.h>
#include <isc/print.h>
#include <isc/util.h>
#include <isc/net.h>
+#include <isc/md.h>
#include <dns/edns.h>
#ifdef WIN32
@@ -168,6 +169,19 @@ main(int argc, char **argv) {
#endif
@@ -158,6 +159,19 @@ main(int argc, char **argv) {
#endif /* ifdef DLZ_FILESYSTEM */
}
+ if (strcmp(argv[1], "--md5") == 0) {
@ -618,7 +618,7 @@ index 2976bfc..256d846 100644
};
diff --git a/bin/tests/system/notify/tests.sh b/bin/tests/system/notify/tests.sh
index fb2eb74..0e45424 100644
index d54ab0d..ba38177 100644
--- a/bin/tests/system/notify/tests.sh
+++ b/bin/tests/system/notify/tests.sh
@@ -212,16 +212,16 @@ ret=0
@ -685,10 +685,10 @@ index 5d70114..6c4b55a 100644
$DDNSCONFGEN -q -a hmac-sha224 -k sha224-key -z keytests.nil > ns1/sha224.key
$DDNSCONFGEN -q -a hmac-sha256 -k sha256-key -z keytests.nil > ns1/sha256.key
diff --git a/bin/tests/system/nsupdate/tests.sh b/bin/tests/system/nsupdate/tests.sh
index b73d178..f573905 100755
index 72a282a..5d42e04 100755
--- a/bin/tests/system/nsupdate/tests.sh
+++ b/bin/tests/system/nsupdate/tests.sh
@@ -708,7 +708,14 @@ fi
@@ -715,7 +715,14 @@ fi
n=`expr $n + 1`
ret=0
echo_i "check TSIG key algorithms ($n)"
@ -704,7 +704,7 @@ index b73d178..f573905 100755
$NSUPDATE -k ns1/${alg}.key <<END > /dev/null || ret=1
server 10.53.0.1 ${PORT}
update add ${alg}.keytests.nil. 600 A 10.10.10.3
@@ -716,7 +723,7 @@ send
@@ -723,7 +730,7 @@ send
END
done
sleep 2
@ -714,10 +714,10 @@ index b73d178..f573905 100755
done
if [ $ret -ne 0 ]; then
diff --git a/bin/tests/system/rndc/setup.sh b/bin/tests/system/rndc/setup.sh
index cb64dd9..c9b2447 100644
index 6b539d1..4d7eaa2 100644
--- a/bin/tests/system/rndc/setup.sh
+++ b/bin/tests/system/rndc/setup.sh
@@ -35,7 +35,7 @@ make_key () {
@@ -33,7 +33,7 @@ make_key () {
sed 's/allow { 10.53.0.4/allow { any/' >> ns4/named.conf
}
@ -727,10 +727,10 @@ index cb64dd9..c9b2447 100644
make_key 3 ${EXTRAPORT3} hmac-sha224
make_key 4 ${EXTRAPORT4} hmac-sha256
diff --git a/bin/tests/system/rndc/tests.sh b/bin/tests/system/rndc/tests.sh
index 7cbe2c7..b8cc6a0 100644
index 2af855a..36cd1aa 100644
--- a/bin/tests/system/rndc/tests.sh
+++ b/bin/tests/system/rndc/tests.sh
@@ -356,15 +356,20 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
@@ -348,15 +348,20 @@ if [ $ret != 0 ]; then echo_i "failed"; fi
status=`expr $status + $ret`
n=`expr $n + 1`
@ -907,10 +907,10 @@ index ea42b4d..08676da 100644
};
diff --git a/bin/tests/system/upforwd/tests.sh b/bin/tests/system/upforwd/tests.sh
index b0694bb..9adae82 100644
index 3b0d7b3..cc1ae3e 100644
--- a/bin/tests/system/upforwd/tests.sh
+++ b/bin/tests/system/upforwd/tests.sh
@@ -68,7 +68,7 @@ if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
@@ -66,7 +66,7 @@ if [ $ret != 0 ] ; then echo_i "failed"; status=`expr $status + $ret`; fi
echo_i "updating zone (signed) ($n)"
ret=0
@ -920,5 +920,5 @@ index b0694bb..9adae82 100644
update add updated.example. 600 A 10.10.10.1
update add updated.example. 600 TXT Foo
--
2.20.1
2.21.1

View File

@ -1,13 +0,0 @@
diff --git a/lib/isc/include/pk11/internal.h b/lib/isc/include/pk11/internal.h
index aa8907a..603712a 100644
--- a/lib/isc/include/pk11/internal.h
+++ b/lib/isc/include/pk11/internal.h
@@ -13,6 +13,8 @@
#ifndef PK11_INTERNAL_H
#define PK11_INTERNAL_H 1
+#include <pk11/pk11.h>
+
/*! \file pk11/internal.h */
ISC_LANG_BEGINDECLS

View File

@ -1,16 +1,13 @@
diff --git a/lib/dns/dyndb.c b/lib/dns/dyndb.c
index 15561ce..e4449b0 100644
index fdc8ea5..d638777 100644
--- a/lib/dns/dyndb.c
+++ b/lib/dns/dyndb.c
@@ -133,8 +133,11 @@ load_library(isc_mem_t *mctx, const char *filename, const char *instname,
@@ -131,7 +131,7 @@ load_library(isc_mem_t *mctx, const char *filename, const char *instname,
instname, filename);
flags = RTLD_NOW|RTLD_LOCAL;
+#if 0
+ /* Shared global namespace is required for dns-pkcs11 library */
#if defined(RTLD_DEEPBIND) && !__SANITIZE_ADDRESS__
flags = RTLD_NOW | RTLD_LOCAL;
-#if defined(RTLD_DEEPBIND) && !__SANITIZE_ADDRESS__
+#if 0 && defined(RTLD_DEEPBIND) && !__SANITIZE_ADDRESS__
flags |= RTLD_DEEPBIND;
+#endif
#endif
#endif /* if defined(RTLD_DEEPBIND) && !__SANITIZE_ADDRESS__ */
handle = dlopen(filename, flags);

View File

@ -1,37 +1,38 @@
From 3bb29f45604ac6890f4ea5cdcbd1a62e6dad14a7 Mon Sep 17 00:00:00 2001
From a1a4730c1f02cd85680cf7608ac81e0db59ee522 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Wed, 16 Jan 2019 16:27:33 +0100
Subject: [PATCH 2/2] Fix possible crash when loading corrupted file
Subject: [PATCH] Fix possible crash when loading corrupted file
Some values passes internal triggers by coincidence. Fix the check and
check also first_node_offset before even passing it further.
---
lib/dns/rbt.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
lib/dns/rbt.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/dns/rbt.c b/lib/dns/rbt.c
index 62d0826..b029b7d 100644
index ef6441b..404fd6d 100644
--- a/lib/dns/rbt.c
+++ b/lib/dns/rbt.c
@@ -787,7 +787,7 @@ treefix(dns_rbt_t *rbt, void *base, size_t filesize, dns_rbtnode_t *n,
return (ISC_R_SUCCESS);
@@ -754,7 +754,7 @@ treefix(dns_rbt_t *rbt, void *base, size_t filesize, dns_rbtnode_t *n,
}
CONFIRM((void *) n >= base);
- CONFIRM((char *) n - (char *) base <= (int) nodemax);
+ CONFIRM((size_t)((char *) n - (char *) base) <= nodemax);
CONFIRM((void *)n >= base);
- CONFIRM((char *)n - (char *)base <= (int)nodemax);
+ CONFIRM((size_t)((char *)n - (char *)base) <= (int)nodemax);
CONFIRM(DNS_RBTNODE_VALID(n));
dns_name_init(&nodename, NULL);
@@ -939,7 +939,8 @@ dns_rbt_deserialize_tree(void *base_address, size_t filesize,
rbt->root = (dns_rbtnode_t *)((char *)base_address +
header_offset + header->first_node_offset);
@@ -911,7 +911,9 @@ dns_rbt_deserialize_tree(void *base_address, size_t filesize,
rbt->root = (dns_rbtnode_t *)((char *)base_address + header_offset +
header->first_node_offset);
- if ((header->nodecount * sizeof(dns_rbtnode_t)) > filesize) {
+ if ((header->nodecount * sizeof(dns_rbtnode_t)) > filesize
+ || header->first_node_offset > filesize) {
+
result = ISC_R_INVALIDFILE;
goto cleanup;
}
--
2.20.1
2.21.1

View File

@ -1,29 +0,0 @@
From 605d1575414c67f5e7eefeaae9dd2d0820c082dc Mon Sep 17 00:00:00 2001
From: Petr Mensik <pemensik@redhat.com>
Date: Thu, 21 Feb 2019 22:42:27 +0100
Subject: [PATCH] Disable random_test
It fails too often on some architecture, failing the whole build along.
Because it runs two times for pkcs11 and normal build and any of
subtests can occasionally fail, stop it.
It can be used again by defining 'unstable' variable in Kyuafile.
---
lib/isc/tests/Kyuafile | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/isc/tests/Kyuafile b/lib/isc/tests/Kyuafile
index e2b2498..df2741e 100644
--- a/lib/isc/tests/Kyuafile
+++ b/lib/isc/tests/Kyuafile
@@ -18,6 +18,7 @@ tap_test_program{name='parse_test'}
tap_test_program{name='pool_test'}
tap_test_program{name='queue_test'}
tap_test_program{name='radix_test'}
+-- tap_test_program{name='random_test', required_configs='unstable'}
tap_test_program{name='regex_test'}
tap_test_program{name='result_test'}
tap_test_program{name='safe_test'}
--
2.20.1

View File

@ -1,41 +0,0 @@
diff --git a/isc-config.sh.in b/isc-config.sh.in
index 40f9bba..e446da2 100644
--- a/isc-config.sh.in
+++ b/isc-config.sh.in
@@ -13,7 +13,18 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
exec_prefix_set=
includedir=@includedir@
-libdir=@libdir@
+arch=$(uname -m)
+
+case $arch in
+ x86_64 | amd64 | sparc64 | s390x | ppc64)
+ libdir=/usr/lib64
+ sec_libdir=/usr/lib
+ ;;
+ * )
+ libdir=/usr/lib
+ sec_libdir=/usr/lib64
+ ;;
+esac
usage()
{
@@ -128,6 +139,16 @@ if test x"$echo_libs" = x"true"; then
if test x"${exec_prefix_set}" = x"true"; then
libs="-L${exec_prefix}/lib"
else
+ if [ ! -x $libdir/libisc.so ] ; then
+ if [ ! -x $sec_libdir/libisc.so ] ; then
+ echo "Error: ISC libs not found in $libdir"
+ if [ -d $sec_libdir ] ; then
+ echo "Error: ISC libs not found in $sec_libdir"
+ fi
+ exit 1
+ fi
+ libdir=$sec_libdir
+ fi
libs="-L${libdir}"
fi
if test x"$libirs" = x"true" ; then

View File

@ -16,7 +16,7 @@
%bcond_without GSSTSIG
# it is not possible to build the package without PKCS11 sub-package
# due to extensive changes to Makefiles
%bcond_without PKCS11
%bcond_with PKCS11
%bcond_without DEVEL
%bcond_without LMDB
%bcond_without JSON
@ -62,24 +62,27 @@
# Visit https://bugzilla.redhat.com/show_bug.cgi?id=1540300
%undefine _strict_symbol_defs_build
#
# significant changes:
# no more isc-config.sh and bind9-config
# lib*.so.X versions of selected libraries
%global sover_dns 1310
%global sover_isc 1309
%global sover_irs 1301
%global sover_isccfg 1302
%global sover_dns 1601
%global sover_isc 1601
%global sover_irs 1600
%global sover_isccfg 1600
Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server
Name: bind
License: MPLv2.0
Version: 9.14.7
Version: 9.16.1
Release: 1%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
Epoch: 32
Url: https://www.isc.org/downloads/bind/
#
Source: https://ftp.isc.org/isc/bind9/%{BINDVERSION}/bind-%{BINDVERSION}.tar.gz
Source: https://ftp.isc.org/isc/bind9/%{BINDVERSION}/bind-%{BINDVERSION}.tar.xz
Source1: named.sysconfig
Source2: https://ftp.isc.org/isc/bind9/%{BINDVERSION}/bind-%{BINDVERSION}.tar.gz.asc
Source2: https://ftp.isc.org/isc/bind9/%{BINDVERSION}/bind-%{BINDVERSION}.tar.xz.asc
Source3: named.logrotate
Source4: https://downloads.isc.org/isc/pgpkeys/codesign2019.txt
Source7: bind-9.3.1rc1-sdb_tools-Makefile.in
@ -124,7 +127,6 @@ Patch101:bind-96-old-api.patch
Patch106:bind93-rh490837.patch
Patch112:bind97-rh645544.patch
Patch130:bind-9.9.1-P2-dlz-libdb.patch
Patch131:bind-9.9.1-P2-multlib-conflict.patch
Patch133:bind99-rh640538.patch
# Make PKCS11 used only for pkcs11 parts
Patch135:bind-9.14-config-pkcs11.patch
@ -141,7 +143,6 @@ Patch140:bind-9.11-rh1410433.patch
Patch150:bind-9.11-engine-pkcs11.patch
Patch153:bind-9.11-export-suffix.patch
Patch154:bind-9.11-oot-manual.patch
Patch155:bind-9.11-pk11.patch
# FIXME: needs review. Should not be required
#Patch156:bind-9.11-fips-code.patch
Patch157:bind-9.11-fips-tests.patch
@ -151,9 +152,6 @@ Patch157:bind-9.11-fips-tests.patch
#Patch159:bind-9.11-rt46047.patch
# https://gitlab.isc.org/isc-projects/bind9/issues/819
Patch164:bind-9.11-rh1666814.patch
# random_test fails too often by random, disable it
# not present on 9.14.0
Patch168:bind-9.11-unit-disable-random.patch
#Patch169:bind-9.11-feature-test-dlz.patch
Patch170:bind-9.11-feature-test-named.patch
Patch171:bind-9.11-tests-variants.patch
@ -209,6 +207,7 @@ BuildRequires: python3-devel
BuildRequires: python3-ply
BuildRequires: findutils sed
BuildRequires: gnupg2
BuildRequires: libuv-devel
%if %{with SDB}
BuildRequires: openldap-devel, libpq-devel, sqlite-devel, mariadb-connector-c-devel
%endif
@ -551,11 +550,11 @@ are used for building ISC DHCP.
%patch106 -p1 -b .rh490837
%patch112 -p1 -b .rh645544
%patch130 -p1 -b .libdb
%patch131 -p1 -b .multlib-conflict
%patch140 -p1 -b .rh1410433
%if %{with EXPORT_LIBS}
%patch153 -p1 -b .export_suffix
%endif
%patch154 -p1 -b .oot-man
%patch155 -p1 -b .pk11-internal
#%patch156 -p1 -b .fips-code
%patch157 -p1 -b .fips-tests
#%patch158 -p1 -b .rt31459
@ -564,7 +563,6 @@ are used for building ISC DHCP.
#%patch161 -p1 -b .host-idn-disable
#%patch163 -p1 -b .rh1663318
%patch164 -p1 -b .rh1666814
%patch168 -p1 -b .random_test-disable
#%patch169 -p1 -b .featuretest-dlz
%patch170 -p1 -b .featuretest-named
%patch171 -p1 -b .test-variant
@ -654,7 +652,6 @@ CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
CFLAGS+=" -O1 -fsanitize=thread -fPIE -pie"
%endif
export CFLAGS
export CPPFLAGS="$CPPFLAGS -DDIG_SIGCHASE"
export STD_CDEFINES="$CPPFLAGS"
@ -775,7 +772,6 @@ popd # build
%systemtest_prepare_build build
%if %{with EXPORT_LIBS}
cp isc-config.sh.1 isc-export-config.sh.1
## Create export libs ##
mkdir -p export-libs
@ -812,12 +808,9 @@ export LIBDIR_SUFFIX
## FIXME this should be in patch instead of SED'ing
## but do we really like/want to patch generated files?
mv isc-config.sh isc-export-config.sh
sed -i \
-e '/^SUBDIRS =/s/.*/SUBDIRS = make lib/i' \
-e 's/isc-config.sh/isc-export-config.sh/g' \
-e 's/bind9-config/bind9-export-config/g' \
Makefile
sed -i -e \
@ -987,6 +980,11 @@ install -m 644 %{SOURCE45} ${RPM_BUILD_ROOT}%{_unitdir}
%if %{with PKCS11}
install -m 644 %{SOURCE47} ${RPM_BUILD_ROOT}%{_unitdir}
%else
# Not packaged without PKCS11
find ${RPM_BUILD_ROOT}%{_includedir}/bind9/pk11 ${RPM_BUILD_ROOT}%{_includedir}/bind9/pkcs11 \
-name '*.h' \! -name site.h -delete
%endif
mkdir -p ${RPM_BUILD_ROOT}%{_libexecdir}
@ -1043,9 +1041,7 @@ find ${RPM_BUILD_ROOT}/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';';
%if !%{with DEVEL}
rm -f ${RPM_BUILD_ROOT}/%{_libdir}/bind9/*so
rm -rf ${RPM_BUILD_ROOT}/%{_includedir}/bind9
rm -f ${RPM_BUILD_ROOT}/%{_mandir}/man1/isc-config.sh.1*
rm -f ${RPM_BUILD_ROOT}/%{_mandir}/man3/lwres*
rm -f ${RPM_BUILD_ROOT}/%{_bindir}/isc-config.sh
%endif
# SDB manpages
@ -1347,9 +1343,9 @@ fi;
%endif
%files libs
%{_libdir}/libbind9.so.1302*
%{_libdir}/libisccc.so.1302*
%{_libdir}/libns.so.1307*
%{_libdir}/libbind9.so.1600*
%{_libdir}/libisccc.so.1600*
%{_libdir}/libns.so.1601*
%files libs-lite
%{_libdir}/libdns.so.%{sover_dns}*
@ -1411,10 +1407,6 @@ fi;
%{_includedir}/bind9/bind9
%{_includedir}/bind9/isccc
%{_includedir}/bind9/ns
%{_mandir}/man1/isc-config.sh.1*
%{_mandir}/man1/bind9-config.1*
%{_bindir}/isc-config.sh
%{_bindir}/bind9-config
%endif
%files lite-devel
@ -1608,6 +1600,9 @@ fi;
%changelog
* Thu Mar 26 2020 Petr Menšík <pemensik@redhat.com> - 32:9.16.1-1
- Update to 9.16.1
* Wed Jan 08 2020 Petr Menšík <pemensik@redhat.com> - 32:9.14.7-1
- Update to 9.14.7

View File

@ -1,78 +1,34 @@
diff --git a/lib/isc/include/isc/stdio.h b/lib/isc/include/isc/stdio.h
index 1f44b5a..a3625f9 100644
--- a/lib/isc/include/isc/stdio.h
+++ b/lib/isc/include/isc/stdio.h
@@ -69,6 +69,9 @@ isc_stdio_sync(FILE *f);
* direct counterpart in the stdio library.
*/
+isc_result_t
+isc_stdio_fgetc(FILE *f, int *ret);
+
ISC_LANG_ENDDECLS
#endif /* ISC_STDIO_H */
diff --git a/lib/isc/lex.c b/lib/isc/lex.c
index ca5fe6d..b0152eb 100644
index cd44fe3..5b7c539 100644
--- a/lib/isc/lex.c
+++ b/lib/isc/lex.c
@@ -433,15 +433,11 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
if (source->is_file) {
stream = source->input;
@@ -27,6 +27,8 @@
#include <isc/string.h>
#include <isc/util.h>
-#if defined(HAVE_FLOCKFILE) && defined(HAVE_GETC_UNLOCKED)
- c = getc_unlocked(stream);
-#else
- c = getc(stream);
-#endif
- if (c == EOF) {
- if (ferror(stream)) {
- source->result = ISC_R_IOERROR;
- result = source->result;
+ result = isc_stdio_fgetc(stream, &c);
+#include "../errno2result.h"
+
+ if (result != ISC_R_SUCCESS) {
+ if (result != ISC_R_EOF) {
+ source->result = result;
typedef struct inputsource {
isc_result_t result;
bool is_file;
@@ -422,7 +424,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
#endif /* if defined(HAVE_FLOCKFILE) && defined(HAVE_GETC_UNLOCKED) */
if (c == EOF) {
if (ferror(stream)) {
- source->result = ISC_R_IOERROR;
+ source->result = isc__errno2result(errno);
result = source->result;
goto done;
}
source->at_eof = true;
diff --git a/lib/isc/unix/errno2result.c b/lib/isc/unix/errno2result.c
index d72d56f..4287ff3 100644
index e3e2644..5e58600 100644
--- a/lib/isc/unix/errno2result.c
+++ b/lib/isc/unix/errno2result.c
@@ -42,6 +42,7 @@ isc___errno2result(int posixerrno, bool dolog,
case EINVAL: /* XXX sometimes this is not for files */
@@ -37,6 +37,7 @@ isc___errno2result(int posixerrno, bool dolog, const char *file,
case EINVAL: /* XXX sometimes this is not for files */
case ENAMETOOLONG:
case EBADF:
+ case EISDIR:
return (ISC_R_INVALIDFILE);
case ENOENT:
return (ISC_R_FILENOTFOUND);
diff --git a/lib/isc/unix/stdio.c b/lib/isc/unix/stdio.c
index d2b1dda..79630b2 100644
--- a/lib/isc/unix/stdio.c
+++ b/lib/isc/unix/stdio.c
@@ -141,3 +141,22 @@ isc_stdio_sync(FILE *f) {
return (isc__errno2result(errno));
}
+isc_result_t
+isc_stdio_fgetc(FILE *f, int *ret) {
+ int r;
+ isc_result_t result = ISC_R_SUCCESS;
+
+#if defined(HAVE_FLOCKFILE) && defined(HAVE_GETCUNLOCKED)
+ r = fgetc_unlocked(f);
+#else
+ r = fgetc(f);
+#endif
+
+ if (r == EOF)
+ result = ferror(f) ? isc__errno2result(errno) : ISC_R_EOF;
+
+ *ret = r;
+
+ return result;
+}
+

View File

@ -1,31 +1,31 @@
diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c
index 2a6e69c..b2f8cec 100644
index 51bc368..20a17b9 100644
--- a/lib/dns/resolver.c
+++ b/lib/dns/resolver.c
@@ -1676,7 +1676,7 @@ log_edns(fetchctx_t *fctx) {
@@ -1754,7 +1754,7 @@ log_edns(fetchctx_t *fctx) {
*/
dns_name_format(&fctx->domain, domainbuf, sizeof(domainbuf));
isc_log_write(dns_lctx, DNS_LOGCATEGORY_EDNS_DISABLED,
- DNS_LOGMODULE_RESOLVER, ISC_LOG_INFO,
+ DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(1),
"success resolving '%s' (in '%s'?) after %s",
fctx->info, domainbuf, fctx->reason);
"success resolving '%s' (in '%s'?) after %s", fctx->info,
domainbuf, fctx->reason);
}
@@ -5084,7 +5084,7 @@ log_lame(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo) {
@@ -5275,7 +5275,7 @@ log_lame(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo) {
dns_name_format(&fctx->domain, domainbuf, sizeof(domainbuf));
isc_sockaddr_format(&addrinfo->sockaddr, addrbuf, sizeof(addrbuf));
isc_log_write(dns_lctx, DNS_LOGCATEGORY_LAME_SERVERS,
- DNS_LOGMODULE_RESOLVER, ISC_LOG_INFO,
+ DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(1),
"lame server resolving '%s' (in '%s'?): %s",
namebuf, domainbuf, addrbuf);
"lame server resolving '%s' (in '%s'?): %s", namebuf,
domainbuf, addrbuf);
}
@@ -5111,7 +5111,7 @@ log_formerr(fetchctx_t *fctx, const char *format, ...) {
@@ -5302,7 +5302,7 @@ log_formerr(fetchctx_t *fctx, const char *format, ...) {
}
isc_log_write(dns_lctx, DNS_LOGCATEGORY_RESOLVER,
- DNS_LOGMODULE_RESOLVER, ISC_LOG_NOTICE,
+ DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(1),
"DNS format error from %s resolving %s%s%s: %s",
nsbuf, fctx->info, clmsg, clbuf, msgbuf);
"DNS format error from %s resolving %s%s%s: %s", nsbuf,
fctx->info, clmsg, clbuf, msgbuf);
}

View File

@ -1 +1,2 @@
SHA512 (bind-9.14.4.tar.gz) = f5f4dc9b6a1d60838b59ce57ad37dc1e51fa26719aa203405a73850780f06bdc6ecea71c762efd464f946bdcce5a7c324de98caea36d2fe2781cce116fcd4932
SHA512 (bind-9.16.1.tar.xz) = 9a1e8987f312b09a16c2ee0fd1d1eb8e4951b8dbcf3c0d51a1a1fb179a261028239ab2bebc3e559592cc766de57a26ba37b27621a0c5e1711d36c2416f0a0c26
SHA512 (bind-9.16.1.tar.xz.asc) = fb9967033a0f8efbc05537ce4f3b315607ff06805b415303cf338afab303ca0f146a4d8049e7166971969b87064aa480a72c41d2c0ab1a8f3165e2049ccc4cb0