rpms/dhcp/F-10 dhclient-script,1.7,1.8 dhcp.spec,1.232,1.233

David Cantrell dcantrel at fedoraproject.org
Sat Jun 27 02:35:14 UTC 2009


Author: dcantrel

Update of /cvs/pkgs/rpms/dhcp/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18131

Modified Files:
	dhclient-script dhcp.spec 
Log Message:
* Fri Jun 26 2009 David Cantrell <dcantrell at redhat.com> - 12:4.0.0-36
- Fix SELinux denials in dhclient-script when the script makes backup
  configuration files and restores them later (#483747)



Index: dhclient-script
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/F-10/dhclient-script,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- dhclient-script	20 Apr 2009 22:52:43 -0000	1.7
+++ dhclient-script	27 Jun 2009 02:34:43 -0000	1.8
@@ -55,7 +55,9 @@ save_previous() {
     fi
 
     if [ -e ${origfile} ]; then
-        mv ${origfile} ${savefile}
+        contents="$(< ${origfile})"
+        echo "${contents}" > ${savefile}
+        rm -f ${origfile}
     else
         echo > ${savefile}
     fi
@@ -525,7 +527,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
@@ -533,14 +537,18 @@ case "${reason}" in
 
             if [ -f ${SAVEDIR}/ntp.conf.predhclient.${interface} ]; then
                 rm -f /etc/ntp.conf
-                mv ${SAVEDIR}/ntp.conf.predhclient.${interface} /etc/ntp.conf
+                contents="$(< ${SAVEDIR}/ntp.conf.predhclient.${interface})"
+                echo "${contents}" > /etc/ntp.conf
+                rm -f ${SAVEDIR}/ntp.conf.predhclient.${interface}
                 fix_context /etc/ntp.conf
                 service ntpd condrestart >/dev/null 2>&1
             fi
 
             if [ -f ${SAVEDIR}/yp.conf.predhclient.${interface} ]; then
                 rm -f /etc/yp.conf
-                mv ${SAVEDIR}/yp.conf.predhclient.${interface} /etc/yp.conf
+                contents="$(< ${SAVEDIR}/yp.conf.predhclient.${interface})"
+                echo "${contents}" > /etc/yp.conf
+                rm -f ${SAVEDIR}/yp.conf.predhclient.${interface}
                 fix_context /etc/yp.conf
                 if [ -x /etc/rc.d/init.d/ypbind ] && [ -r /var/run/ypbind.pid ]; then
                     service ypbind restart >/dev/null 2>&1


Index: dhcp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/F-10/dhcp.spec,v
retrieving revision 1.232
retrieving revision 1.233
diff -u -p -r1.232 -r1.233
--- dhcp.spec	20 Apr 2009 22:52:43 -0000	1.232
+++ dhcp.spec	27 Jun 2009 02:34:43 -0000	1.233
@@ -4,7 +4,7 @@
 Summary:  DHCP (Dynamic Host Configuration Protocol) server and relay agent
 Name:     dhcp
 Version:  4.0.0
-Release:  35%{?dist}
+Release:  36%{?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.
@@ -449,6 +449,10 @@ fi
 %{_libdir}/libdhcp4client.so
 
 %changelog
+* Fri Jun 26 2009 David Cantrell <dcantrell at redhat.com> - 12:4.0.0-36
+- Fix SELinux denials in dhclient-script when the script makes backup
+  configuration files and restores them later (#483747)
+
 * Mon Apr 20 2009 David Cantrell <dcantrell at redhat.com> - 12:4.0.0-35
 - Make dhclient-script work with pre-configured wireless interfaces (#491157)
 




More information about the fedora-extras-commits mailing list