Do not use eval in NM dispatcher script

This commit is contained in:
Pavel Zhukov 2018-05-18 09:51:01 +02:00
parent 16546798c5
commit ec19ab3458
2 changed files with 8 additions and 9 deletions

View File

@ -6,15 +6,11 @@ SAVEDIR=/var/lib/dhclient
ETCDIR=/etc/dhcp
interface=$1
eval "$(
declare | LC_ALL=C grep '^DHCP4_[A-Z_]*=' | while read -r opt; do
optname=${opt%%=*}
optname=${optname,,}
optname=new_${optname#dhcp4_}
optvalue=${opt#*=}
echo "export $optname=$optvalue"
for optname in "${!DHCP4_@}"; do
newoptname=${optname,,};
newoptname=new_${newoptname#dhcp4_};
export $newoptname="${!optname}";
done
)"
[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network

View File

@ -16,7 +16,7 @@
Summary: Dynamic host configuration protocol software
Name: dhcp
Version: 4.3.6
Release: 21%{?dist}
Release: 22%{?dist}
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
# dcantrell maintaining the package) made incorrect use of the epoch and
# that's why it is at 12 now. It should have never been used, but it was.
@ -677,6 +677,9 @@ done
%endif
%changelog
* Fri May 18 2018 Pavel Zhukov <pzhukov@redhat.com> - 12:4.3.6-22
- Get rid of eval in 11-dhclient
* Tue May 15 2018 Pavel Zhukov <pzhukov@redhat.com> - 12:4.3.6-21
- Fix for CVE-2018-1111