From 226011db1ad83a3f79be7f74fbee86628229dc02 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Jun 27 2009 03:17:04 +0000 Subject: - Handle cases in add_timeout() where the function is called with a NULL value for the 'when' parameter (#506626) - Fix SELinux denials in dhclient-script when the script makes backup configuration files and restores them later (#483747) --- diff --git a/dhclient-script b/dhclient-script index 5899b55..928e1f1 100755 --- a/dhclient-script +++ b/dhclient-script @@ -57,7 +57,9 @@ save_previous() { fi if [ -e ${origfile} ]; then - mv ${origfile} ${savefile} + contents="$(< ${origfile})" + echo "${contents}" > ${savefile} + rm -f ${origfile} else echo > ${savefile} fi @@ -483,7 +485,9 @@ case "${reason}" in [[ "${DHCP_TIME_OFFSET_SETS_TIMEZONE}" = [yY1]* ]]; then if [ -e ${SAVEDIR}/localtime.predhclient.${interface} ]; then rm -f /etc/localtime - mv ${SAVEDIR}/localtime.predhclient.${interface} /etc/localtime + contents="$(< ${SAVEDIR}/localtime.predhclient.${interface})" + echo "${contents}" > /etc/localtime + rm -f ${SAVEDIR}/localtime.predhclient.${interface} touch /etc/localtime fix_context /etc/localtime fi diff --git a/dhcp.spec b/dhcp.spec index 61ac03a..6131f6f 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -432,6 +432,8 @@ fi * Fri Jun 26 2009 David Cantrell - 12:4.1.0-21 - Handle cases in add_timeout() where the function is called with a NULL value for the 'when' parameter (#506626) +- Fix SELinux denials in dhclient-script when the script makes backup + configuration files and restores them later (#483747) * Wed May 06 2009 David Cantrell - 12:4.1.0-20 - Obsolete libdhcp4client <= 12:4.0.0-34.fc10 (#499290)