Propagate system emphemeral ports to chroot

BIND reads default system port ranges from /proc file. Propagate just
that single file to bind chroot. Defaults should be therefore the same
as on named.service.

Resolves: rhbz#2013597
This commit is contained in:
Petr Menšík 2021-10-13 11:21:00 +02:00
parent 59865beb68
commit 67a5f4ae99
2 changed files with 7 additions and 2 deletions

View File

@ -32,7 +32,7 @@
%global chroot_prefix %{bind_dir}/chroot %global chroot_prefix %{bind_dir}/chroot
%global chroot_create_directories /dev /run/named %{_localstatedir}/{log,named,tmp} \\\ %global chroot_create_directories /dev /run/named %{_localstatedir}/{log,named,tmp} \\\
%{_sysconfdir}/{crypto-policies/back-ends,pki/dnssec-keys,named} \\\ %{_sysconfdir}/{crypto-policies/back-ends,pki/dnssec-keys,named} \\\
%{_libdir}/bind %{_libdir}/named %{_datadir}/GeoIP %{_libdir}/bind %{_libdir}/named %{_datadir}/GeoIP /proc/sys/net/ipv4
%global selinuxbooleans named_write_master_zones=1 %global selinuxbooleans named_write_master_zones=1
## The order of libs is important. See lib/Makefile.in for details ## The order of libs is important. See lib/Makefile.in for details
@ -53,7 +53,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind Name: bind
License: MPLv2.0 License: MPLv2.0
Version: 9.16.21 Version: 9.16.21
Release: 1%{?dist} Release: 2%{?dist}
Epoch: 32 Epoch: 32
Url: https://www.isc.org/downloads/bind/ Url: https://www.isc.org/downloads/bind/
# #
@ -1049,6 +1049,7 @@ fi;
%dir %{chroot_prefix}/%{_libdir} %dir %{chroot_prefix}/%{_libdir}
%dir %{chroot_prefix}/%{_libdir}/bind %dir %{chroot_prefix}/%{_libdir}/bind
%dir %{chroot_prefix}/%{_datadir}/GeoIP %dir %{chroot_prefix}/%{_datadir}/GeoIP
%{chroot_prefix}/proc
%defattr(0660,root,named,01770) %defattr(0660,root,named,01770)
%dir %{chroot_prefix}%{_localstatedir}/named %dir %{chroot_prefix}%{_localstatedir}/named
%defattr(0660,named,named,0770) %defattr(0660,named,named,0770)
@ -1121,6 +1122,9 @@ fi;
%endif %endif
%changelog %changelog
* Wed Oct 13 2021 Petr Menšík <pemensik@redhat.com> - 32:9.16.21-2
- Propagate ephemeral port ranges to chroot (#2013597)
* Wed Sep 15 2021 Petr Menšík <pemensik@redhat.com> - 32:9.16.21-1 * Wed Sep 15 2021 Petr Menšík <pemensik@redhat.com> - 32:9.16.21-1
- Update to 9.16.21 - Update to 9.16.21

View File

@ -20,6 +20,7 @@
/usr/lib/named /usr/lib/named
/usr/share/GeoIP /usr/share/GeoIP
/run/named /run/named
/proc/sys/net/ipv4/ip_local_port_range
# Warning: the order is important # Warning: the order is important
# If a directory containing $ROOTDIR is listed here, # If a directory containing $ROOTDIR is listed here,
# it MUST be listed last. (/var/named contains /var/named/chroot) # it MUST be listed last. (/var/named contains /var/named/chroot)