1 |
commit: 62f712e79805c9d040c9bf278b64c5a892d81d92 |
2 |
Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 17 09:02:16 2019 +0000 |
4 |
Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 17 09:02:16 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62f712e7 |
7 |
|
8 |
net-dns/bind: Security cleanup |
9 |
|
10 |
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
12 |
|
13 |
net-dns/bind/Manifest | 2 - |
14 |
net-dns/bind/bind-9.11.2_p1.ebuild | 423 --------------------- |
15 |
net-dns/bind/bind-9.11.3-r1.ebuild | 402 -------------------- |
16 |
net-dns/bind/files/bind-9.11.3-CVE-2018-5738.patch | 110 ------ |
17 |
.../bind/files/bind-9.12.1_p2-CVE-2018-5738.patch | 95 ----- |
18 |
net-dns/bind/metadata.xml | 1 - |
19 |
6 files changed, 1033 deletions(-) |
20 |
|
21 |
diff --git a/net-dns/bind/Manifest b/net-dns/bind/Manifest |
22 |
index c66ef2d610f..a66bfcf96cf 100644 |
23 |
--- a/net-dns/bind/Manifest |
24 |
+++ b/net-dns/bind/Manifest |
25 |
@@ -1,5 +1,3 @@ |
26 |
-DIST bind-9.11.2_p1.tar.gz 9783329 BLAKE2B 5a3bbd87112064231bd5e6b09ebb4014f9d5cf65cb601c03555ff540a22d87aec3990cd8e37ce5ff09e9a149bdf122d20ecb01f87731e6c79d80379a6926014f SHA512 168f27f580e3be2f7ada27afa2f72e715e750eec76831cf01bd32fabc1fa65dc29dab0eb7ed1682b076d3be99269897ddbc2c10551631a3911d9e5ae1aa40597 |
27 |
-DIST bind-9.11.3.tar.gz 9523375 BLAKE2B 978986e02767b8ac9f015b52e87b3bc161a7ea72f59f343dcb23f50fbe8474528c4b27ee4fd54bdbe6bd825ce6e8b164e8ad145260b2cdcd004e8892bacd313b SHA512 1f0da13165d1ee872800fe10bb8b0f69c6c76515f9861c1528fb6005213bb71b21a1270906d2ea9ded3eaf6df1a1bac0f2c80aa511683b8d57dcff4f278d8c35 |
28 |
DIST bind-9.11.4_p2.tar.gz 9617963 BLAKE2B 409cad7e0976f2e46406d45e87241d61d4d4f00bf08442c4dddbad490ea3d6e42eaad5851fddb83c61a897689a8fdba0cd920aaa0d36329868d26100ba48f946 SHA512 6c01810526fc40485a6c0403d1ddc3b76d2e59b3426b5789436bd671f158d2fa0ea7c0aef2de81998ec715dabd06683fed7b17224d5c794c61e7100a69d4cb60 |
29 |
DIST bind-9.12.2_p2.tar.gz 9422128 BLAKE2B c7d56f025f381a0136aa67ccd49a3254fcfe566d5e3601410e5cada26ccab32a901fe6e14bc14e6e287fa2b3904a4eee8e3ef63329f9bc4cb11f204590ff3623 SHA512 458adf6b3d0df286e7d345a21c40b639efcb275e76f9e0bf4e40a5d76dcac875016324393e129f29397be326d1017367c506ec9cbb35871c98fad4281bc4e05a |
30 |
DIST bind-9.12.3_p1.tar.gz 8625693 BLAKE2B 1899e04e409d3dafe63494fb7a0d8b813a6487754149bbfd01888cddc5e134ac675e9ac790684fb6fd8de4b1484e23ed7f1881c01234c9f16b27180c9a4594a9 SHA512 c1c91de88e4297e79b527775edd525c6fa948f169977563ab2e6ca93cac7317f8ca85863567f5cc151d4c6e3c081864ab1cf813bcfdd1165b52e9471b8317c28 |
31 |
|
32 |
diff --git a/net-dns/bind/bind-9.11.2_p1.ebuild b/net-dns/bind/bind-9.11.2_p1.ebuild |
33 |
deleted file mode 100644 |
34 |
index d02197d6ec2..00000000000 |
35 |
--- a/net-dns/bind/bind-9.11.2_p1.ebuild |
36 |
+++ /dev/null |
37 |
@@ -1,423 +0,0 @@ |
38 |
-# Copyright 1999-2018 Gentoo Foundation |
39 |
-# Distributed under the terms of the GNU General Public License v2 |
40 |
- |
41 |
-# Re dlz/mysql and threads, needs to be verified.. |
42 |
-# MySQL uses thread local storage in its C api. Thus MySQL |
43 |
-# requires that each thread of an application execute a MySQL |
44 |
-# thread initialization to setup the thread local storage. |
45 |
-# This is impossible to do safely while staying within the DLZ |
46 |
-# driver API. This is a limitation caused by MySQL, and not the DLZ API. |
47 |
-# Because of this BIND MUST only run with a single thread when |
48 |
-# using the MySQL driver. |
49 |
- |
50 |
-EAPI="5" |
51 |
- |
52 |
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) |
53 |
- |
54 |
-inherit python-r1 eutils autotools toolchain-funcs flag-o-matic multilib db-use user systemd |
55 |
- |
56 |
-MY_PV="${PV/_p/-P}" |
57 |
-MY_PV="${MY_PV/_rc/rc}" |
58 |
-MY_P="${PN}-${MY_PV}" |
59 |
- |
60 |
-SDB_LDAP_VER="1.1.0-fc14" |
61 |
- |
62 |
-RRL_PV="${MY_PV}" |
63 |
- |
64 |
-NSLINT_DIR="contrib/nslint-3.0a2/" |
65 |
- |
66 |
-# SDB-LDAP: http://bind9-ldap.bayour.com/ |
67 |
- |
68 |
-DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server" |
69 |
-HOMEPAGE="http://www.isc.org/software/bind" |
70 |
-SRC_URI="https://www.isc.org/downloads/file/${MY_P}/?version=tar-gz -> ${P}.tar.gz |
71 |
- doc? ( mirror://gentoo/dyndns-samples.tbz2 )" |
72 |
-# sdb-ldap? ( |
73 |
-# http://ftp.disconnected-by-peer.at/pub/bind-sdb-ldap-${SDB_LDAP_VER}.patch.bz2 |
74 |
-# )" |
75 |
- |
76 |
-LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0" |
77 |
-SLOT="0" |
78 |
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
79 |
-# -berkdb by default re bug 602682 |
80 |
-IUSE="-berkdb +caps dlz dnstap doc filter-aaaa fixed-rrset geoip gost gssapi idn ipv6 |
81 |
-json ldap libressl lmdb mysql nslint odbc postgres python rpz seccomp selinux ssl static-libs |
82 |
-+threads urandom xml +zlib" |
83 |
-# sdb-ldap - patch broken |
84 |
-# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687 |
85 |
- |
86 |
-REQUIRED_USE="postgres? ( dlz ) |
87 |
- berkdb? ( dlz ) |
88 |
- mysql? ( dlz !threads ) |
89 |
- odbc? ( dlz ) |
90 |
- ldap? ( dlz ) |
91 |
- gost? ( !libressl ssl ) |
92 |
- threads? ( caps ) |
93 |
- dnstap? ( threads ) |
94 |
- python? ( ${PYTHON_REQUIRED_USE} )" |
95 |
-# sdb-ldap? ( dlz ) |
96 |
- |
97 |
-DEPEND=" |
98 |
- ssl? ( |
99 |
- !libressl? ( dev-libs/openssl:0[-bindist] ) |
100 |
- libressl? ( dev-libs/libressl ) |
101 |
- ) |
102 |
- mysql? ( >=virtual/mysql-4.0 ) |
103 |
- odbc? ( >=dev-db/unixODBC-2.2.6 ) |
104 |
- ldap? ( net-nds/openldap ) |
105 |
- idn? ( net-dns/idnkit ) |
106 |
- postgres? ( dev-db/postgresql:= ) |
107 |
- caps? ( >=sys-libs/libcap-2.1.0 ) |
108 |
- xml? ( dev-libs/libxml2 ) |
109 |
- geoip? ( >=dev-libs/geoip-1.4.6 ) |
110 |
- gssapi? ( virtual/krb5 ) |
111 |
- gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] ) |
112 |
- seccomp? ( sys-libs/libseccomp ) |
113 |
- json? ( dev-libs/json-c:= ) |
114 |
- lmdb? ( dev-db/lmdb ) |
115 |
- zlib? ( sys-libs/zlib ) |
116 |
- dnstap? ( dev-libs/fstrm dev-libs/protobuf-c ) |
117 |
- python? ( |
118 |
- ${PYTHON_DEPS} |
119 |
- dev-python/ply[${PYTHON_USEDEP}] |
120 |
- )" |
121 |
-# sdb-ldap? ( net-nds/openldap ) |
122 |
- |
123 |
-RDEPEND="${DEPEND} |
124 |
- selinux? ( sec-policy/selinux-bind ) |
125 |
- || ( sys-process/psmisc >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd )" |
126 |
- |
127 |
-S="${WORKDIR}/${MY_P}" |
128 |
- |
129 |
-# bug 479092, requires networking |
130 |
-RESTRICT="test" |
131 |
- |
132 |
-pkg_setup() { |
133 |
- ebegin "Creating named group and user" |
134 |
- enewgroup named 40 |
135 |
- enewuser named 40 -1 /etc/bind named |
136 |
- eend ${?} |
137 |
-} |
138 |
- |
139 |
-src_prepare() { |
140 |
- # Adjusting PATHs in manpages |
141 |
- for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do |
142 |
- sed -i \ |
143 |
- -e 's:/etc/named.conf:/etc/bind/named.conf:g' \ |
144 |
- -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \ |
145 |
- -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \ |
146 |
- "${i}" || die "sed failed, ${i} doesn't exist" |
147 |
- done |
148 |
- |
149 |
-# if use dlz; then |
150 |
-# # sdb-ldap patch as per bug #160567 |
151 |
-# # Upstream URL: http://bind9-ldap.bayour.com/ |
152 |
-# # New patch take from bug 302735 |
153 |
-# if use sdb-ldap; then |
154 |
-# epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch |
155 |
-# cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/ |
156 |
-# cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/ |
157 |
-# cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/ |
158 |
-# fi |
159 |
-# fi |
160 |
- |
161 |
- # should be installed by bind-tools |
162 |
- sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die |
163 |
- |
164 |
- # Disable tests for now, bug 406399 |
165 |
- sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die |
166 |
- |
167 |
- if use nslint; then |
168 |
- sed -i -e 's:/etc/named.conf:/etc/bind/named.conf:' ${NSLINT_DIR}/nslint.{c,8} || die |
169 |
- fi |
170 |
- |
171 |
- # bug #220361 |
172 |
- rm aclocal.m4 |
173 |
- rm -rf libtool.m4/ |
174 |
- eautoreconf |
175 |
-} |
176 |
- |
177 |
-src_configure() { |
178 |
- local myconf="" |
179 |
- |
180 |
- if use urandom; then |
181 |
- myconf="${myconf} --with-randomdev=/dev/urandom" |
182 |
- else |
183 |
- myconf="${myconf} --with-randomdev=/dev/random" |
184 |
- fi |
185 |
- |
186 |
- use geoip && myconf="${myconf} --with-geoip" |
187 |
- |
188 |
- # bug #158664 |
189 |
-# gcc-specs-ssp && replace-flags -O[23s] -O |
190 |
- |
191 |
- # To include db.h from proper path |
192 |
- use berkdb && append-flags "-I$(db_includedir)" |
193 |
- |
194 |
- export BUILD_CC=$(tc-getBUILD_CC) |
195 |
- econf \ |
196 |
- --sysconfdir=/etc/bind \ |
197 |
- --localstatedir=/var \ |
198 |
- --with-libtool \ |
199 |
- --enable-full-report \ |
200 |
- --without-readline \ |
201 |
- $(use_enable caps linux-caps) \ |
202 |
- $(use_enable filter-aaaa) \ |
203 |
- $(use_enable fixed-rrset) \ |
204 |
- $(use_enable ipv6) \ |
205 |
- $(use_enable rpz rpz-nsdname) \ |
206 |
- $(use_enable rpz rpz-nsip) \ |
207 |
- $(use_enable seccomp) \ |
208 |
- $(use_enable threads) \ |
209 |
- $(use_with berkdb dlz-bdb) \ |
210 |
- $(use_with dlz dlopen) \ |
211 |
- $(use_with dlz dlz-filesystem) \ |
212 |
- $(use_with dlz dlz-stub) \ |
213 |
- $(use_with gost) \ |
214 |
- $(use_with gssapi) \ |
215 |
- $(use_with idn) \ |
216 |
- $(use_with json libjson) \ |
217 |
- $(use_with ldap dlz-ldap) \ |
218 |
- $(use_with mysql dlz-mysql) \ |
219 |
- $(use_with odbc dlz-odbc) \ |
220 |
- $(use_with postgres dlz-postgres) \ |
221 |
- $(use_with lmdb) \ |
222 |
- $(use_with python) \ |
223 |
- $(use_with ssl ecdsa) \ |
224 |
- $(use_with ssl openssl "${EPREFIX}"/usr) \ |
225 |
- $(use_with xml libxml2) \ |
226 |
- $(use_with zlib) \ |
227 |
- ${myconf} |
228 |
- |
229 |
- # $(use_enable static-libs static) \ |
230 |
- |
231 |
- # bug #151839 |
232 |
- echo '#undef SO_BSDCOMPAT' >> config.h |
233 |
- |
234 |
- if use nslint; then |
235 |
- cd $NSLINT_DIR |
236 |
- econf |
237 |
- fi |
238 |
-} |
239 |
- |
240 |
-src_compile() { |
241 |
- emake |
242 |
- |
243 |
- if use nslint; then |
244 |
- emake -C $NSLINT_DIR CCOPT="${CFLAGS}" |
245 |
- fi |
246 |
-} |
247 |
- |
248 |
-src_install() { |
249 |
- emake DESTDIR="${D}" install |
250 |
- |
251 |
- if use nslint; then |
252 |
- cd $NSLINT_DIR |
253 |
- dobin nslint |
254 |
- doman nslint.8 |
255 |
- cd "${S}" |
256 |
- fi |
257 |
- |
258 |
- dodoc CHANGES README |
259 |
- |
260 |
- if use idn; then |
261 |
- dodoc contrib/idn/README.idnkit |
262 |
- fi |
263 |
- |
264 |
- if use doc; then |
265 |
- dodoc doc/arm/Bv9ARM.pdf |
266 |
- |
267 |
- docinto misc |
268 |
- dodoc doc/misc/* |
269 |
- |
270 |
- # might a 'html' useflag make sense? |
271 |
- docinto html |
272 |
- dohtml -r doc/arm/* |
273 |
- |
274 |
- docinto contrib |
275 |
- dodoc contrib/scripts/{nanny.pl,named-bootconf.sh} |
276 |
- |
277 |
- # some handy-dandy dynamic dns examples |
278 |
- pushd "${D}"/usr/share/doc/${PF} 1>/dev/null |
279 |
- tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die |
280 |
- popd 1>/dev/null |
281 |
- fi |
282 |
- |
283 |
- insinto /etc/bind |
284 |
- newins "${FILESDIR}"/named.conf-r8 named.conf |
285 |
- |
286 |
- # ftp://ftp.rs.internic.net/domain/named.cache: |
287 |
- insinto /var/bind |
288 |
- newins "${FILESDIR}"/named.cache-r3 named.cache |
289 |
- |
290 |
- insinto /var/bind/pri |
291 |
- newins "${FILESDIR}"/localhost.zone-r3 localhost.zone |
292 |
- |
293 |
- newinitd "${FILESDIR}"/named.init-r13 named |
294 |
- newconfd "${FILESDIR}"/named.confd-r7 named |
295 |
- |
296 |
- if use gost; then |
297 |
- sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' "${D}/etc/init.d/named" || die |
298 |
- else |
299 |
- sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' "${D}/etc/init.d/named" || die |
300 |
- fi |
301 |
- |
302 |
- newenvd "${FILESDIR}"/10bind.env 10bind |
303 |
- |
304 |
- # Let's get rid of those tools and their manpages since they're provided by bind-tools |
305 |
- rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1* |
306 |
- rm -f "${D}"/usr/share/man/man8/nsupdate.8* |
307 |
- rm -f "${D}"/usr/bin/{dig,host,nslookup,nsupdate} |
308 |
- rm -f "${D}"/usr/sbin/{dig,host,nslookup,nsupdate} |
309 |
- for tool in dsfromkey importkey keyfromlabel keygen \ |
310 |
- revoke settime signzone verify; do |
311 |
- rm -f "${D}"/usr/{,s}bin/dnssec-"${tool}" |
312 |
- rm -f "${D}"/usr/share/man/man8/dnssec-"${tool}".8* |
313 |
- done |
314 |
- |
315 |
- # bug 405251, library archives aren't properly handled by --enable/disable-static |
316 |
- if ! use static-libs; then |
317 |
- find "${D}" -type f -name '*.a' -delete || die |
318 |
- fi |
319 |
- |
320 |
- # bug 405251 |
321 |
- find "${D}" -type f -name '*.la' -delete || die |
322 |
- |
323 |
- if use python; then |
324 |
- install_python_tools() { |
325 |
- dosbin bin/python/dnssec-{checkds,coverage} |
326 |
- } |
327 |
- python_foreach_impl install_python_tools |
328 |
- |
329 |
- python_replicate_script "${D}usr/sbin/dnssec-checkds" |
330 |
- python_replicate_script "${D}usr/sbin/dnssec-coverage" |
331 |
- fi |
332 |
- |
333 |
- # bug 450406 |
334 |
- dosym named.cache /var/bind/root.cache |
335 |
- |
336 |
- dosym /var/bind/pri /etc/bind/pri |
337 |
- dosym /var/bind/sec /etc/bind/sec |
338 |
- dosym /var/bind/dyn /etc/bind/dyn |
339 |
- keepdir /var/bind/{pri,sec,dyn} |
340 |
- |
341 |
- dodir /var/log/named |
342 |
- |
343 |
- fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn} |
344 |
- fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf} |
345 |
- fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf} |
346 |
- fperms 0750 /etc/bind /var/bind/pri |
347 |
- fperms 0770 /var/log/named /var/bind/{,sec,dyn} |
348 |
- |
349 |
- systemd_newunit "${FILESDIR}/named.service-r1" named.service |
350 |
- systemd_dotmpfilesd "${FILESDIR}"/named.conf |
351 |
- exeinto /usr/libexec |
352 |
- doexe "${FILESDIR}/generate-rndc-key.sh" |
353 |
-} |
354 |
- |
355 |
-pkg_postinst() { |
356 |
- if [ ! -f '/etc/bind/rndc.key' ]; then |
357 |
- if use urandom; then |
358 |
- einfo "Using /dev/urandom for generating rndc.key" |
359 |
- /usr/sbin/rndc-confgen -r /dev/urandom -a |
360 |
- echo |
361 |
- else |
362 |
- einfo "Using /dev/random for generating rndc.key" |
363 |
- /usr/sbin/rndc-confgen -a |
364 |
- echo |
365 |
- fi |
366 |
- chown root:named /etc/bind/rndc.key |
367 |
- chmod 0640 /etc/bind/rndc.key |
368 |
- fi |
369 |
- |
370 |
- einfo |
371 |
- einfo "You can edit /etc/conf.d/named to customize named settings" |
372 |
- einfo |
373 |
- use mysql || use postgres || use ldap && { |
374 |
- elog "If your named depends on MySQL/PostgreSQL or LDAP," |
375 |
- elog "uncomment the specified rc_named_* lines in your" |
376 |
- elog "/etc/conf.d/named config to ensure they'll start before bind" |
377 |
- einfo |
378 |
- } |
379 |
- einfo "If you'd like to run bind in a chroot AND this is a new" |
380 |
- einfo "install OR your bind doesn't already run in a chroot:" |
381 |
- einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named." |
382 |
- einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`" |
383 |
- einfo |
384 |
- |
385 |
- CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT}) |
386 |
- if [[ -n ${CHROOT} ]]; then |
387 |
- elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
388 |
- elog "To enable the old behaviour (without using mount) uncomment the" |
389 |
- elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config." |
390 |
- elog "If you decide to use the new/default method, ensure to make backup" |
391 |
- elog "first and merge your existing configs/zones to /etc/bind and" |
392 |
- elog "/var/bind because bind will now mount the needed directories into" |
393 |
- elog "the chroot dir." |
394 |
- fi |
395 |
-} |
396 |
- |
397 |
-pkg_config() { |
398 |
- CHROOT=$(source /etc/conf.d/named; echo ${CHROOT}) |
399 |
- CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT}) |
400 |
- CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP}) |
401 |
- |
402 |
- if [[ -z "${CHROOT}" ]]; then |
403 |
- eerror "This config script is designed to automate setting up" |
404 |
- eerror "a chrooted bind/named. To do so, please first uncomment" |
405 |
- eerror "and set the CHROOT variable in '/etc/conf.d/named'." |
406 |
- die "Unset CHROOT" |
407 |
- fi |
408 |
- if [[ -d "${CHROOT}" ]]; then |
409 |
- ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
410 |
- ewarn "To enable the old behaviour (without using mount) uncomment the" |
411 |
- ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config." |
412 |
- ewarn |
413 |
- ewarn "${CHROOT} already exists... some things might become overridden" |
414 |
- ewarn "press CTRL+C if you don't want to continue" |
415 |
- sleep 10 |
416 |
- fi |
417 |
- |
418 |
- echo; einfo "Setting up the chroot directory..." |
419 |
- |
420 |
- mkdir -m 0750 -p ${CHROOT} |
421 |
- mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run} |
422 |
- mkdir -m 0750 -p ${CHROOT}/etc/bind |
423 |
- mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ |
424 |
- # As of bind 9.8.0 |
425 |
- if has_version net-dns/bind[gost]; then |
426 |
- if [ "$(get_libdir)" = "lib64" ]; then |
427 |
- mkdir -m 0755 -p ${CHROOT}/usr/lib64/engines |
428 |
- ln -s lib64 ${CHROOT}/usr/lib |
429 |
- else |
430 |
- mkdir -m 0755 -p ${CHROOT}/usr/lib/engines |
431 |
- fi |
432 |
- fi |
433 |
- chown root:named ${CHROOT} ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ ${CHROOT}/etc/bind |
434 |
- |
435 |
- mknod ${CHROOT}/dev/null c 1 3 |
436 |
- chmod 0666 ${CHROOT}/dev/null |
437 |
- |
438 |
- mknod ${CHROOT}/dev/zero c 1 5 |
439 |
- chmod 0666 ${CHROOT}/dev/zero |
440 |
- |
441 |
- if use urandom; then |
442 |
- mknod ${CHROOT}/dev/urandom c 1 9 |
443 |
- chmod 0666 ${CHROOT}/dev/urandom |
444 |
- else |
445 |
- mknod ${CHROOT}/dev/random c 1 8 |
446 |
- chmod 0666 ${CHROOT}/dev/random |
447 |
- fi |
448 |
- |
449 |
- if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then |
450 |
- cp -a /etc/bind ${CHROOT}/etc/ |
451 |
- cp -a /var/bind ${CHROOT}/var/ |
452 |
- fi |
453 |
- |
454 |
- if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then |
455 |
- mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP |
456 |
- fi |
457 |
- |
458 |
- elog "You may need to add the following line to your syslog-ng.conf:" |
459 |
- elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };" |
460 |
-} |
461 |
|
462 |
diff --git a/net-dns/bind/bind-9.11.3-r1.ebuild b/net-dns/bind/bind-9.11.3-r1.ebuild |
463 |
deleted file mode 100644 |
464 |
index 74e4fcd1fc1..00000000000 |
465 |
--- a/net-dns/bind/bind-9.11.3-r1.ebuild |
466 |
+++ /dev/null |
467 |
@@ -1,402 +0,0 @@ |
468 |
-# Copyright 1999-2018 Gentoo Foundation |
469 |
-# Distributed under the terms of the GNU General Public License v2 |
470 |
- |
471 |
-# Re dlz/mysql and threads, needs to be verified.. |
472 |
-# MySQL uses thread local storage in its C api. Thus MySQL |
473 |
-# requires that each thread of an application execute a MySQL |
474 |
-# thread initialization to setup the thread local storage. |
475 |
-# This is impossible to do safely while staying within the DLZ |
476 |
-# driver API. This is a limitation caused by MySQL, and not the DLZ API. |
477 |
-# Because of this BIND MUST only run with a single thread when |
478 |
-# using the MySQL driver. |
479 |
- |
480 |
-EAPI="5" |
481 |
- |
482 |
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) |
483 |
- |
484 |
-inherit python-r1 eutils autotools toolchain-funcs flag-o-matic multilib db-use user systemd |
485 |
- |
486 |
-MY_PV="${PV/_p/-P}" |
487 |
-MY_PV="${MY_PV/_rc/rc}" |
488 |
-MY_P="${PN}-${MY_PV}" |
489 |
- |
490 |
-SDB_LDAP_VER="1.1.0-fc14" |
491 |
- |
492 |
-RRL_PV="${MY_PV}" |
493 |
- |
494 |
-NSLINT_DIR="contrib/nslint-3.0a2/" |
495 |
- |
496 |
-# SDB-LDAP: http://bind9-ldap.bayour.com/ |
497 |
- |
498 |
-DESCRIPTION="BIND - Berkeley Internet Name Domain - Name Server" |
499 |
-HOMEPAGE="http://www.isc.org/software/bind" |
500 |
-SRC_URI="https://www.isc.org/downloads/file/${MY_P}/?version=tar-gz -> ${P}.tar.gz |
501 |
- doc? ( mirror://gentoo/dyndns-samples.tbz2 )" |
502 |
-# sdb-ldap? ( |
503 |
-# http://ftp.disconnected-by-peer.at/pub/bind-sdb-ldap-${SDB_LDAP_VER}.patch.bz2 |
504 |
-# )" |
505 |
- |
506 |
-LICENSE="Apache-2.0 BSD BSD-2 GPL-2 HPND ISC MPL-2.0" |
507 |
-SLOT="0" |
508 |
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
509 |
-# -berkdb by default re bug 602682 |
510 |
-IUSE="-berkdb +caps dlz dnstap doc filter-aaaa fixed-rrset geoip gost gssapi idn ipv6 |
511 |
-json ldap libressl lmdb mysql odbc postgres python rpz seccomp selinux ssl static-libs |
512 |
-+threads urandom xml +zlib" |
513 |
-# sdb-ldap - patch broken |
514 |
-# no PKCS11 currently as it requires OpenSSL to be patched, also see bug 409687 |
515 |
- |
516 |
-REQUIRED_USE="postgres? ( dlz ) |
517 |
- berkdb? ( dlz ) |
518 |
- mysql? ( dlz !threads ) |
519 |
- odbc? ( dlz ) |
520 |
- ldap? ( dlz ) |
521 |
- gost? ( !libressl ssl ) |
522 |
- threads? ( caps ) |
523 |
- dnstap? ( threads ) |
524 |
- python? ( ${PYTHON_REQUIRED_USE} )" |
525 |
-# sdb-ldap? ( dlz ) |
526 |
- |
527 |
-DEPEND=" |
528 |
- ssl? ( |
529 |
- !libressl? ( dev-libs/openssl:0[-bindist] ) |
530 |
- libressl? ( dev-libs/libressl ) |
531 |
- ) |
532 |
- mysql? ( >=virtual/mysql-4.0 ) |
533 |
- odbc? ( >=dev-db/unixODBC-2.2.6 ) |
534 |
- ldap? ( net-nds/openldap ) |
535 |
- idn? ( net-dns/idnkit ) |
536 |
- postgres? ( dev-db/postgresql:= ) |
537 |
- caps? ( >=sys-libs/libcap-2.1.0 ) |
538 |
- xml? ( dev-libs/libxml2 ) |
539 |
- geoip? ( >=dev-libs/geoip-1.4.6 ) |
540 |
- gssapi? ( virtual/krb5 ) |
541 |
- gost? ( >=dev-libs/openssl-1.0.0:0[-bindist] ) |
542 |
- seccomp? ( sys-libs/libseccomp ) |
543 |
- json? ( dev-libs/json-c:= ) |
544 |
- lmdb? ( dev-db/lmdb ) |
545 |
- zlib? ( sys-libs/zlib ) |
546 |
- dnstap? ( dev-libs/fstrm dev-libs/protobuf-c ) |
547 |
- python? ( |
548 |
- ${PYTHON_DEPS} |
549 |
- dev-python/ply[${PYTHON_USEDEP}] |
550 |
- )" |
551 |
-# sdb-ldap? ( net-nds/openldap ) |
552 |
- |
553 |
-RDEPEND="${DEPEND} |
554 |
- selinux? ( sec-policy/selinux-bind ) |
555 |
- || ( sys-process/psmisc >=sys-freebsd/freebsd-ubin-9.0_rc sys-process/fuser-bsd )" |
556 |
- |
557 |
-S="${WORKDIR}/${MY_P}" |
558 |
- |
559 |
-# bug 479092, requires networking |
560 |
-RESTRICT="test" |
561 |
- |
562 |
-pkg_setup() { |
563 |
- ebegin "Creating named group and user" |
564 |
- enewgroup named 40 |
565 |
- enewuser named 40 -1 /etc/bind named |
566 |
- eend ${?} |
567 |
-} |
568 |
- |
569 |
-src_prepare() { |
570 |
- # Adjusting PATHs in manpages |
571 |
- for i in bin/{named/named.8,check/named-checkconf.8,rndc/rndc.8} ; do |
572 |
- sed -i \ |
573 |
- -e 's:/etc/named.conf:/etc/bind/named.conf:g' \ |
574 |
- -e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \ |
575 |
- -e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \ |
576 |
- "${i}" || die "sed failed, ${i} doesn't exist" |
577 |
- done |
578 |
- |
579 |
- # bug 657654 / CVE-2018-5738 |
580 |
- epatch "${FILESDIR}/${P}-CVE-2018-5738.patch" |
581 |
- |
582 |
-# if use dlz; then |
583 |
-# # sdb-ldap patch as per bug #160567 |
584 |
-# # Upstream URL: http://bind9-ldap.bayour.com/ |
585 |
-# # New patch take from bug 302735 |
586 |
-# if use sdb-ldap; then |
587 |
-# epatch "${WORKDIR}"/${PN}-sdb-ldap-${SDB_LDAP_VER}.patch |
588 |
-# cp -fp contrib/sdb/ldap/ldapdb.[ch] bin/named/ |
589 |
-# cp -fp contrib/sdb/ldap/{ldap2zone.1,ldap2zone.c} bin/tools/ |
590 |
-# cp -fp contrib/sdb/ldap/{zone2ldap.1,zone2ldap.c} bin/tools/ |
591 |
-# fi |
592 |
-# fi |
593 |
- |
594 |
- # should be installed by bind-tools |
595 |
- sed -i -r -e "s:(nsupdate|dig|delv) ::g" bin/Makefile.in || die |
596 |
- |
597 |
- # Disable tests for now, bug 406399 |
598 |
- sed -i '/^SUBDIRS/s:tests::' bin/Makefile.in lib/Makefile.in || die |
599 |
- |
600 |
- # bug #220361 |
601 |
- rm aclocal.m4 |
602 |
- rm -rf libtool.m4/ |
603 |
- eautoreconf |
604 |
-} |
605 |
- |
606 |
-src_configure() { |
607 |
- local myconf="" |
608 |
- |
609 |
- if use urandom; then |
610 |
- myconf="${myconf} --with-randomdev=/dev/urandom" |
611 |
- else |
612 |
- myconf="${myconf} --with-randomdev=/dev/random" |
613 |
- fi |
614 |
- |
615 |
- use geoip && myconf="${myconf} --with-geoip" |
616 |
- |
617 |
- # bug #158664 |
618 |
-# gcc-specs-ssp && replace-flags -O[23s] -O |
619 |
- |
620 |
- # To include db.h from proper path |
621 |
- use berkdb && append-flags "-I$(db_includedir)" |
622 |
- |
623 |
- export BUILD_CC=$(tc-getBUILD_CC) |
624 |
- econf \ |
625 |
- --sysconfdir=/etc/bind \ |
626 |
- --localstatedir=/var \ |
627 |
- --with-libtool \ |
628 |
- --enable-full-report \ |
629 |
- --without-readline \ |
630 |
- $(use_enable caps linux-caps) \ |
631 |
- $(use_enable filter-aaaa) \ |
632 |
- $(use_enable fixed-rrset) \ |
633 |
- $(use_enable ipv6) \ |
634 |
- $(use_enable rpz rpz-nsdname) \ |
635 |
- $(use_enable rpz rpz-nsip) \ |
636 |
- $(use_enable seccomp) \ |
637 |
- $(use_enable threads) \ |
638 |
- $(use_with berkdb dlz-bdb) \ |
639 |
- $(use_with dlz dlopen) \ |
640 |
- $(use_with dlz dlz-filesystem) \ |
641 |
- $(use_with dlz dlz-stub) \ |
642 |
- $(use_with gost) \ |
643 |
- $(use_with gssapi) \ |
644 |
- $(use_with idn) \ |
645 |
- $(use_with json libjson) \ |
646 |
- $(use_with ldap dlz-ldap) \ |
647 |
- $(use_with mysql dlz-mysql) \ |
648 |
- $(use_with odbc dlz-odbc) \ |
649 |
- $(use_with postgres dlz-postgres) \ |
650 |
- $(use_with lmdb) \ |
651 |
- $(use_with python) \ |
652 |
- $(use_with ssl ecdsa) \ |
653 |
- $(use_with ssl openssl "${EPREFIX}"/usr) \ |
654 |
- $(use_with xml libxml2) \ |
655 |
- $(use_with zlib) \ |
656 |
- ${myconf} |
657 |
- |
658 |
- # $(use_enable static-libs static) \ |
659 |
- |
660 |
- # bug #151839 |
661 |
- echo '#undef SO_BSDCOMPAT' >> config.h |
662 |
-} |
663 |
- |
664 |
-src_install() { |
665 |
- emake DESTDIR="${D}" install |
666 |
- |
667 |
- dodoc CHANGES README |
668 |
- |
669 |
- if use idn; then |
670 |
- dodoc contrib/idn/README.idnkit |
671 |
- fi |
672 |
- |
673 |
- if use doc; then |
674 |
- dodoc doc/arm/Bv9ARM.pdf |
675 |
- |
676 |
- docinto misc |
677 |
- dodoc doc/misc/* |
678 |
- |
679 |
- # might a 'html' useflag make sense? |
680 |
- docinto html |
681 |
- dohtml -r doc/arm/* |
682 |
- |
683 |
- docinto contrib |
684 |
- dodoc contrib/scripts/{nanny.pl,named-bootconf.sh} |
685 |
- |
686 |
- # some handy-dandy dynamic dns examples |
687 |
- pushd "${D}"/usr/share/doc/${PF} 1>/dev/null |
688 |
- tar xf "${DISTDIR}"/dyndns-samples.tbz2 || die |
689 |
- popd 1>/dev/null |
690 |
- fi |
691 |
- |
692 |
- insinto /etc/bind |
693 |
- newins "${FILESDIR}"/named.conf-r8 named.conf |
694 |
- |
695 |
- # ftp://ftp.rs.internic.net/domain/named.cache: |
696 |
- insinto /var/bind |
697 |
- newins "${FILESDIR}"/named.cache-r3 named.cache |
698 |
- |
699 |
- insinto /var/bind/pri |
700 |
- newins "${FILESDIR}"/localhost.zone-r3 localhost.zone |
701 |
- |
702 |
- newinitd "${FILESDIR}"/named.init-r13 named |
703 |
- newconfd "${FILESDIR}"/named.confd-r7 named |
704 |
- |
705 |
- if use gost; then |
706 |
- sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}/' "${D}/etc/init.d/named" || die |
707 |
- else |
708 |
- sed -i -e 's/^OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-1}$/OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}/' "${D}/etc/init.d/named" || die |
709 |
- fi |
710 |
- |
711 |
- newenvd "${FILESDIR}"/10bind.env 10bind |
712 |
- |
713 |
- # Let's get rid of those tools and their manpages since they're provided by bind-tools |
714 |
- rm -f "${D}"/usr/share/man/man1/{dig,host,nslookup}.1* |
715 |
- rm -f "${D}"/usr/share/man/man8/nsupdate.8* |
716 |
- rm -f "${D}"/usr/bin/{dig,host,nslookup,nsupdate} |
717 |
- rm -f "${D}"/usr/sbin/{dig,host,nslookup,nsupdate} |
718 |
- for tool in dsfromkey importkey keyfromlabel keygen \ |
719 |
- revoke settime signzone verify; do |
720 |
- rm -f "${D}"/usr/{,s}bin/dnssec-"${tool}" |
721 |
- rm -f "${D}"/usr/share/man/man8/dnssec-"${tool}".8* |
722 |
- done |
723 |
- |
724 |
- # bug 405251, library archives aren't properly handled by --enable/disable-static |
725 |
- if ! use static-libs; then |
726 |
- find "${D}" -type f -name '*.a' -delete || die |
727 |
- fi |
728 |
- |
729 |
- # bug 405251 |
730 |
- find "${D}" -type f -name '*.la' -delete || die |
731 |
- |
732 |
- if use python; then |
733 |
- install_python_tools() { |
734 |
- dosbin bin/python/dnssec-{checkds,coverage} |
735 |
- } |
736 |
- python_foreach_impl install_python_tools |
737 |
- |
738 |
- python_replicate_script "${D}usr/sbin/dnssec-checkds" |
739 |
- python_replicate_script "${D}usr/sbin/dnssec-coverage" |
740 |
- fi |
741 |
- |
742 |
- # bug 450406 |
743 |
- dosym named.cache /var/bind/root.cache |
744 |
- |
745 |
- dosym /var/bind/pri /etc/bind/pri |
746 |
- dosym /var/bind/sec /etc/bind/sec |
747 |
- dosym /var/bind/dyn /etc/bind/dyn |
748 |
- keepdir /var/bind/{pri,sec,dyn} |
749 |
- |
750 |
- dodir /var/log/named |
751 |
- |
752 |
- fowners root:named /{etc,var}/bind /var/log/named /var/bind/{sec,pri,dyn} |
753 |
- fowners root:named /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf} |
754 |
- fperms 0640 /var/bind/named.cache /var/bind/pri/localhost.zone /etc/bind/{bind.keys,named.conf} |
755 |
- fperms 0750 /etc/bind /var/bind/pri |
756 |
- fperms 0770 /var/log/named /var/bind/{,sec,dyn} |
757 |
- |
758 |
- systemd_newunit "${FILESDIR}/named.service-r1" named.service |
759 |
- systemd_dotmpfilesd "${FILESDIR}"/named.conf |
760 |
- exeinto /usr/libexec |
761 |
- doexe "${FILESDIR}/generate-rndc-key.sh" |
762 |
-} |
763 |
- |
764 |
-pkg_postinst() { |
765 |
- if [ ! -f '/etc/bind/rndc.key' ]; then |
766 |
- if use urandom; then |
767 |
- einfo "Using /dev/urandom for generating rndc.key" |
768 |
- /usr/sbin/rndc-confgen -r /dev/urandom -a |
769 |
- echo |
770 |
- else |
771 |
- einfo "Using /dev/random for generating rndc.key" |
772 |
- /usr/sbin/rndc-confgen -a |
773 |
- echo |
774 |
- fi |
775 |
- chown root:named /etc/bind/rndc.key |
776 |
- chmod 0640 /etc/bind/rndc.key |
777 |
- fi |
778 |
- |
779 |
- einfo |
780 |
- einfo "You can edit /etc/conf.d/named to customize named settings" |
781 |
- einfo |
782 |
- use mysql || use postgres || use ldap && { |
783 |
- elog "If your named depends on MySQL/PostgreSQL or LDAP," |
784 |
- elog "uncomment the specified rc_named_* lines in your" |
785 |
- elog "/etc/conf.d/named config to ensure they'll start before bind" |
786 |
- einfo |
787 |
- } |
788 |
- einfo "If you'd like to run bind in a chroot AND this is a new" |
789 |
- einfo "install OR your bind doesn't already run in a chroot:" |
790 |
- einfo "1) Uncomment and set the CHROOT variable in /etc/conf.d/named." |
791 |
- einfo "2) Run \`emerge --config '=${CATEGORY}/${PF}'\`" |
792 |
- einfo |
793 |
- |
794 |
- CHROOT=$(source /etc/conf.d/named 2>/dev/null; echo ${CHROOT}) |
795 |
- if [[ -n ${CHROOT} ]]; then |
796 |
- elog "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
797 |
- elog "To enable the old behaviour (without using mount) uncomment the" |
798 |
- elog "CHROOT_NOMOUNT option in your /etc/conf.d/named config." |
799 |
- elog "If you decide to use the new/default method, ensure to make backup" |
800 |
- elog "first and merge your existing configs/zones to /etc/bind and" |
801 |
- elog "/var/bind because bind will now mount the needed directories into" |
802 |
- elog "the chroot dir." |
803 |
- fi |
804 |
-} |
805 |
- |
806 |
-pkg_config() { |
807 |
- CHROOT=$(source /etc/conf.d/named; echo ${CHROOT}) |
808 |
- CHROOT_NOMOUNT=$(source /etc/conf.d/named; echo ${CHROOT_NOMOUNT}) |
809 |
- CHROOT_GEOIP=$(source /etc/conf.d/named; echo ${CHROOT_GEOIP}) |
810 |
- |
811 |
- if [[ -z "${CHROOT}" ]]; then |
812 |
- eerror "This config script is designed to automate setting up" |
813 |
- eerror "a chrooted bind/named. To do so, please first uncomment" |
814 |
- eerror "and set the CHROOT variable in '/etc/conf.d/named'." |
815 |
- die "Unset CHROOT" |
816 |
- fi |
817 |
- if [[ -d "${CHROOT}" ]]; then |
818 |
- ewarn "NOTE: As of net-dns/bind-9.4.3_p5-r1 the chroot part of the init-script got some major changes!" |
819 |
- ewarn "To enable the old behaviour (without using mount) uncomment the" |
820 |
- ewarn "CHROOT_NOMOUNT option in your /etc/conf.d/named config." |
821 |
- ewarn |
822 |
- ewarn "${CHROOT} already exists... some things might become overridden" |
823 |
- ewarn "press CTRL+C if you don't want to continue" |
824 |
- sleep 10 |
825 |
- fi |
826 |
- |
827 |
- echo; einfo "Setting up the chroot directory..." |
828 |
- |
829 |
- mkdir -m 0750 -p ${CHROOT} |
830 |
- mkdir -m 0755 -p ${CHROOT}/{dev,etc,var/log,run} |
831 |
- mkdir -m 0750 -p ${CHROOT}/etc/bind |
832 |
- mkdir -m 0770 -p ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ |
833 |
- # As of bind 9.8.0 |
834 |
- if has_version net-dns/bind[gost]; then |
835 |
- if [ "$(get_libdir)" = "lib64" ]; then |
836 |
- mkdir -m 0755 -p ${CHROOT}/usr/lib64/engines |
837 |
- ln -s lib64 ${CHROOT}/usr/lib |
838 |
- else |
839 |
- mkdir -m 0755 -p ${CHROOT}/usr/lib/engines |
840 |
- fi |
841 |
- fi |
842 |
- chown root:named ${CHROOT} ${CHROOT}/var/{bind,log/named} ${CHROOT}/run/named/ ${CHROOT}/etc/bind |
843 |
- |
844 |
- mknod ${CHROOT}/dev/null c 1 3 |
845 |
- chmod 0666 ${CHROOT}/dev/null |
846 |
- |
847 |
- mknod ${CHROOT}/dev/zero c 1 5 |
848 |
- chmod 0666 ${CHROOT}/dev/zero |
849 |
- |
850 |
- if use urandom; then |
851 |
- mknod ${CHROOT}/dev/urandom c 1 9 |
852 |
- chmod 0666 ${CHROOT}/dev/urandom |
853 |
- else |
854 |
- mknod ${CHROOT}/dev/random c 1 8 |
855 |
- chmod 0666 ${CHROOT}/dev/random |
856 |
- fi |
857 |
- |
858 |
- if [ "${CHROOT_NOMOUNT:-0}" -ne 0 ]; then |
859 |
- cp -a /etc/bind ${CHROOT}/etc/ |
860 |
- cp -a /var/bind ${CHROOT}/var/ |
861 |
- fi |
862 |
- |
863 |
- if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then |
864 |
- mkdir -m 0755 -p ${CHROOT}/usr/share/GeoIP |
865 |
- fi |
866 |
- |
867 |
- elog "You may need to add the following line to your syslog-ng.conf:" |
868 |
- elog "source jail { unix-stream(\"${CHROOT}/dev/log\"); };" |
869 |
-} |
870 |
|
871 |
diff --git a/net-dns/bind/files/bind-9.11.3-CVE-2018-5738.patch b/net-dns/bind/files/bind-9.11.3-CVE-2018-5738.patch |
872 |
deleted file mode 100644 |
873 |
index 4a2c7832ebf..00000000000 |
874 |
--- a/net-dns/bind/files/bind-9.11.3-CVE-2018-5738.patch |
875 |
+++ /dev/null |
876 |
@@ -1,110 +0,0 @@ |
877 |
-diff --git a/bin/named/server.c b/bin/named/server.c |
878 |
-index 64a5180..41a1826 100644 |
879 |
---- a/bin/named/server.c |
880 |
-+++ b/bin/named/server.c |
881 |
-@@ -3376,10 +3376,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, |
882 |
- dns_acache_setcachesize(view->acache, max_acache_size); |
883 |
- } |
884 |
- |
885 |
-- CHECK(configure_view_acl(vconfig, config, ns_g_config, |
886 |
-- "allow-query", NULL, actx, |
887 |
-- ns_g_mctx, &view->queryacl)); |
888 |
-- |
889 |
- /* |
890 |
- * Make the list of response policy zone names for a view that |
891 |
- * is used for real lookups and so cares about hints. |
892 |
-@@ -4258,9 +4254,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, |
893 |
- INSIST(result == ISC_R_SUCCESS); |
894 |
- view->trust_anchor_telemetry = cfg_obj_asboolean(obj); |
895 |
- |
896 |
-- CHECK(configure_view_acl(vconfig, config, ns_g_config, |
897 |
-- "allow-query-cache-on", NULL, actx, |
898 |
-- ns_g_mctx, &view->cacheonacl)); |
899 |
- /* |
900 |
- * Set sources where additional data and CNAME/DNAME |
901 |
- * targets for authoritative answers may be found. |
902 |
-@@ -4287,22 +4280,40 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, |
903 |
- view->additionalfromcache = ISC_TRUE; |
904 |
- } |
905 |
- |
906 |
-+ CHECK(configure_view_acl(vconfig, config, ns_g_config, |
907 |
-+ "allow-query-cache-on", NULL, actx, |
908 |
-+ ns_g_mctx, &view->cacheonacl)); |
909 |
-+ |
910 |
- /* |
911 |
-- * Set "allow-query-cache", "allow-recursion", and |
912 |
-- * "allow-recursion-on" acls if configured in named.conf. |
913 |
-- * (Ignore the global defaults for now, because these ACLs |
914 |
-- * can inherit from each other when only some of them set at |
915 |
-- * the options/view level.) |
916 |
-+ * Set the "allow-query", "allow-query-cache", "allow-recursion", |
917 |
-+ * and "allow-recursion-on" ACLs if configured in named.conf, but |
918 |
-+ * NOT from the global defaults. This is done by leaving the third |
919 |
-+ * argument to configure_view_acl() NULL. |
920 |
-+ * |
921 |
-+ * We ignore the global defaults here because these ACLs |
922 |
-+ * can inherit from each other. If any are still unset after |
923 |
-+ * applying the inheritance rules, we'll look up the defaults at |
924 |
-+ * that time. |
925 |
- */ |
926 |
-- CHECK(configure_view_acl(vconfig, config, NULL, "allow-query-cache", |
927 |
-- NULL, actx, ns_g_mctx, &view->cacheacl)); |
928 |
-+ |
929 |
-+ /* named.conf only */ |
930 |
-+ CHECK(configure_view_acl(vconfig, config, NULL, |
931 |
-+ "allow-query", NULL, actx, |
932 |
-+ ns_g_mctx, &view->queryacl)); |
933 |
-+ |
934 |
-+ /* named.conf only */ |
935 |
-+ CHECK(configure_view_acl(vconfig, config, NULL, |
936 |
-+ "allow-query-cache", NULL, actx, |
937 |
-+ ns_g_mctx, &view->cacheacl)); |
938 |
- |
939 |
- if (strcmp(view->name, "_bind") != 0 && |
940 |
- view->rdclass != dns_rdataclass_chaos) |
941 |
- { |
942 |
-+ /* named.conf only */ |
943 |
- CHECK(configure_view_acl(vconfig, config, NULL, |
944 |
- "allow-recursion", NULL, actx, |
945 |
- ns_g_mctx, &view->recursionacl)); |
946 |
-+ /* named.conf only */ |
947 |
- CHECK(configure_view_acl(vconfig, config, NULL, |
948 |
- "allow-recursion-on", NULL, actx, |
949 |
- ns_g_mctx, &view->recursiononacl)); |
950 |
-@@ -4340,18 +4351,21 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, |
951 |
- * the global config. |
952 |
- */ |
953 |
- if (view->recursionacl == NULL) { |
954 |
-+ /* global default only */ |
955 |
- CHECK(configure_view_acl(NULL, NULL, ns_g_config, |
956 |
- "allow-recursion", NULL, |
957 |
- actx, ns_g_mctx, |
958 |
- &view->recursionacl)); |
959 |
- } |
960 |
- if (view->recursiononacl == NULL) { |
961 |
-+ /* global default only */ |
962 |
- CHECK(configure_view_acl(NULL, NULL, ns_g_config, |
963 |
- "allow-recursion-on", NULL, |
964 |
- actx, ns_g_mctx, |
965 |
- &view->recursiononacl)); |
966 |
- } |
967 |
- if (view->cacheacl == NULL) { |
968 |
-+ /* global default only */ |
969 |
- CHECK(configure_view_acl(NULL, NULL, ns_g_config, |
970 |
- "allow-query-cache", NULL, |
971 |
- actx, ns_g_mctx, |
972 |
-@@ -4365,6 +4379,14 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, |
973 |
- CHECK(dns_acl_none(mctx, &view->cacheacl)); |
974 |
- } |
975 |
- |
976 |
-+ if (view->queryacl == NULL) { |
977 |
-+ /* global default only */ |
978 |
-+ CHECK(configure_view_acl(NULL, NULL, ns_g_config, |
979 |
-+ "allow-query", NULL, |
980 |
-+ actx, ns_g_mctx, |
981 |
-+ &view->queryacl)); |
982 |
-+ } |
983 |
-+ |
984 |
- /* |
985 |
- * Ignore case when compressing responses to the specified |
986 |
- * clients. This causes case not always to be preserved, |
987 |
|
988 |
diff --git a/net-dns/bind/files/bind-9.12.1_p2-CVE-2018-5738.patch b/net-dns/bind/files/bind-9.12.1_p2-CVE-2018-5738.patch |
989 |
deleted file mode 100644 |
990 |
index 75c98d4f175..00000000000 |
991 |
--- a/net-dns/bind/files/bind-9.12.1_p2-CVE-2018-5738.patch |
992 |
+++ /dev/null |
993 |
@@ -1,95 +0,0 @@ |
994 |
-diff --git a/bin/named/server.c b/bin/named/server.c |
995 |
-index f63554e..847c4ff 100644 |
996 |
---- a/bin/named/server.c |
997 |
-+++ b/bin/named/server.c |
998 |
-@@ -3725,10 +3725,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, |
999 |
- CHECKM(named_config_getport(config, &port), "port"); |
1000 |
- dns_view_setdstport(view, port); |
1001 |
- |
1002 |
-- CHECK(configure_view_acl(vconfig, config, named_g_config, |
1003 |
-- "allow-query", NULL, actx, |
1004 |
-- named_g_mctx, &view->queryacl)); |
1005 |
-- |
1006 |
- /* |
1007 |
- * Make the list of response policy zone names for a view that |
1008 |
- * is used for real lookups and so cares about hints. |
1009 |
-@@ -4692,21 +4688,35 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, |
1010 |
- "allow-query-cache-on", NULL, actx, |
1011 |
- named_g_mctx, &view->cacheonacl)); |
1012 |
- /* |
1013 |
-- * Set "allow-query-cache", "allow-recursion", and |
1014 |
-- * "allow-recursion-on" acls if configured in named.conf. |
1015 |
-- * (Ignore the global defaults for now, because these ACLs |
1016 |
-- * can inherit from each other when only some of them set at |
1017 |
-- * the options/view level.) |
1018 |
-+ * Set the "allow-query", "allow-query-cache", "allow-recursion", |
1019 |
-+ * and "allow-recursion-on" ACLs if configured in named.conf, but |
1020 |
-+ * NOT from the global defaults. This is done by leaving the third |
1021 |
-+ * argument to configure_view_acl() NULL. |
1022 |
-+ * |
1023 |
-+ * We ignore the global defaults here because these ACLs |
1024 |
-+ * can inherit from each other. If any are still unset after |
1025 |
-+ * applying the inheritance rules, we'll look up the defaults at |
1026 |
-+ * that time. |
1027 |
- */ |
1028 |
-- CHECK(configure_view_acl(vconfig, config, NULL, "allow-query-cache", |
1029 |
-- NULL, actx, named_g_mctx, &view->cacheacl)); |
1030 |
-+ |
1031 |
-+ /* named.conf only */ |
1032 |
-+ CHECK(configure_view_acl(vconfig, config, NULL, |
1033 |
-+ "allow-query", NULL, actx, |
1034 |
-+ named_g_mctx, &view->queryacl)); |
1035 |
-+ |
1036 |
-+ /* named.conf only */ |
1037 |
-+ CHECK(configure_view_acl(vconfig, config, NULL, |
1038 |
-+ "allow-query-cache", NULL, actx, |
1039 |
-+ named_g_mctx, &view->cacheacl)); |
1040 |
- |
1041 |
- if (strcmp(view->name, "_bind") != 0 && |
1042 |
- view->rdclass != dns_rdataclass_chaos) |
1043 |
- { |
1044 |
-+ /* named.conf only */ |
1045 |
- CHECK(configure_view_acl(vconfig, config, NULL, |
1046 |
- "allow-recursion", NULL, actx, |
1047 |
- named_g_mctx, &view->recursionacl)); |
1048 |
-+ /* named.conf only */ |
1049 |
- CHECK(configure_view_acl(vconfig, config, NULL, |
1050 |
- "allow-recursion-on", NULL, actx, |
1051 |
- named_g_mctx, &view->recursiononacl)); |
1052 |
-@@ -4744,18 +4754,21 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, |
1053 |
- * the global config. |
1054 |
- */ |
1055 |
- if (view->recursionacl == NULL) { |
1056 |
-+ /* global default only */ |
1057 |
- CHECK(configure_view_acl(NULL, NULL, named_g_config, |
1058 |
- "allow-recursion", NULL, |
1059 |
- actx, named_g_mctx, |
1060 |
- &view->recursionacl)); |
1061 |
- } |
1062 |
- if (view->recursiononacl == NULL) { |
1063 |
-+ /* global default only */ |
1064 |
- CHECK(configure_view_acl(NULL, NULL, named_g_config, |
1065 |
- "allow-recursion-on", NULL, |
1066 |
- actx, named_g_mctx, |
1067 |
- &view->recursiononacl)); |
1068 |
- } |
1069 |
- if (view->cacheacl == NULL) { |
1070 |
-+ /* global default only */ |
1071 |
- CHECK(configure_view_acl(NULL, NULL, named_g_config, |
1072 |
- "allow-query-cache", NULL, |
1073 |
- actx, named_g_mctx, |
1074 |
-@@ -4769,6 +4782,14 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, |
1075 |
- CHECK(dns_acl_none(mctx, &view->cacheacl)); |
1076 |
- } |
1077 |
- |
1078 |
-+ if (view->queryacl == NULL) { |
1079 |
-+ /* global default only */ |
1080 |
-+ CHECK(configure_view_acl(NULL, NULL, named_g_config, |
1081 |
-+ "allow-query", NULL, |
1082 |
-+ actx, named_g_mctx, |
1083 |
-+ &view->queryacl)); |
1084 |
-+ } |
1085 |
-+ |
1086 |
- /* |
1087 |
- * Ignore case when compressing responses to the specified |
1088 |
- * clients. This causes case not always to be preserved, |
1089 |
|
1090 |
diff --git a/net-dns/bind/metadata.xml b/net-dns/bind/metadata.xml |
1091 |
index 8ccec0f9e0a..06a3fa600f2 100644 |
1092 |
--- a/net-dns/bind/metadata.xml |
1093 |
+++ b/net-dns/bind/metadata.xml |
1094 |
@@ -17,7 +17,6 @@ |
1095 |
<flag name="json">Enable JSON statistics channel</flag> |
1096 |
<flag name="libidn2">Enables IDN support using <pkg>net-dns/libidn2</pkg> rather than using <pkg>net-dns/idnkit</pkg></flag> |
1097 |
<flag name="lmdb">Enable LMDB support to store configuration for 'addzone' zones</flag> |
1098 |
- <flag name="nslint">Build and install the nslint util</flag> |
1099 |
<flag name="rpz">Enable response policy rewriting (rpz)</flag> |
1100 |
<flag name="urandom">Use /dev/urandom instead of /dev/random</flag> |
1101 |
</use> |