rpms/dhcp/F-9 dhcp-4.0.0-garbage-chars.patch, NONE, 1.1 dhcp.spec, 1.211, 1.212 linux, 1.14, 1.15

David Cantrell (dcantrel) fedora-extras-commits at redhat.com
Wed Aug 6 19:40:29 UTC 2008


Author: dcantrel

Update of /cvs/pkgs/rpms/dhcp/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11591

Modified Files:
	dhcp.spec linux 
Added Files:
	dhcp-4.0.0-garbage-chars.patch 
Log Message:
* Wed Aug 06 2008 David Cantrell <dcantrell at redhat.com> - 12:4.0.0-18
- Remove 'c' from the domain-search format string in common/tables.c
- Prevent \032 from appearing in resolv.conf search line (#450042)
- Restore SELinux context on saved /etc files (#451560)


dhcp-4.0.0-garbage-chars.patch:

--- NEW FILE dhcp-4.0.0-garbage-chars.patch ---
diff -up dhcp-4.0.0//common/tables.c.garbage dhcp-4.0.0//common/tables.c
--- dhcp-4.0.0//common/tables.c.garbage	2007-12-03 09:10:19.000000000 -1000
+++ dhcp-4.0.0//common/tables.c	2008-08-05 14:59:08.000000000 -1000
@@ -201,7 +201,7 @@ static struct option dhcp_options[] = {
 	{ "netinfo-server-tag", "t",		&dhcp_universe, 113, 1 },
 	{ "default-url", "t",			&dhcp_universe, 114, 1 },
 	{ "subnet-selection", "I",		&dhcp_universe, 118, 1 },
-	{ "domain-search", "Dc",		&dhcp_universe, 119, 1 },
+	{ "domain-search", "D",		&dhcp_universe, 119, 1 },
 	{ "vivco", "Evendor-class.",		&dhcp_universe, 124, 1 },
 	{ "vivso", "Evendor.",			&dhcp_universe, 125, 1 },
 #if 0


Index: dhcp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/F-9/dhcp.spec,v
retrieving revision 1.211
retrieving revision 1.212
diff -u -r1.211 -r1.212
--- dhcp.spec	1 Aug 2008 22:23:12 -0000	1.211
+++ dhcp.spec	6 Aug 2008 19:39:59 -0000	1.212
@@ -4,7 +4,7 @@
 Summary:  DHCP (Dynamic Host Configuration Protocol) server and relay agent
 Name:     dhcp
 Version:  4.0.0
-Release:  17%{?dist}
+Release:  18%{?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.
@@ -46,6 +46,7 @@
 Patch17:  %{name}-4.0.0-FD_CLOEXEC.patch
 Patch18:  %{name}-4.0.0-libdhcp4client.patch
 Patch19:  %{name}-4.0.0-inherit-leases.patch
+Patch20:  %{name}-4.0.0-garbage-chars.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: autoconf
@@ -198,6 +199,9 @@
 # If we have an active lease, do not down the interface (#453982)
 %patch19 -p1
 
+# Fix 'garbage in format string' error (#450052)
+%patch20 -p1
+
 # Copy in documentation and example scripts for LDAP patch to dhcpd
 %{__install} -p -m 0644 %{SOURCE5} .
 %{__install} -p -m 0644 %{SOURCE6} doc/
@@ -426,6 +430,11 @@
 %{_libdir}/libdhcp4client.so
 
 %changelog
+* Wed Aug 06 2008 David Cantrell <dcantrell at redhat.com> - 12:4.0.0-18
+- Remove 'c' from the domain-search format string in common/tables.c
+- Prevent \032 from appearing in resolv.conf search line (#450042)
+- Restore SELinux context on saved /etc files (#451560)
+
 * Fri Aug 01 2008 David Cantrell <dcantrell at redhat.com> - 12:4.0.0-17
 - Carry over RES_OPTIONS from ifcfg-ethX files to /etc/resolv.conf (#202923)
 - Clean up Requires tags for devel packages


Index: linux
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/F-9/linux,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- linux	1 Aug 2008 22:23:12 -0000	1.14
+++ linux	6 Aug 2008 19:39:59 -0000	1.15
@@ -29,6 +29,10 @@
     else
         echo ''> $1.predhclient.$interface
     fi
+
+    if [ -x /sbin/restorecon ]; then
+        /sbin/restorecon $1.predhclient.$interface >/dev/null 2>&1
+    fi
 }
 
 make_resolv_conf() {
@@ -42,21 +46,19 @@
         return
     fi
 
-    if [ -n "$new_domain_name" ] || [ -n "$new_domain_name_servers" ]; then
-        cp -fp /etc/resolv.conf /etc/resolv.conf.predhclient.$interface
+    if [ -n "$new_domain_name" ] || [ -n "$new_domain_name_servers" ] || [ -n "$new_domain_search" ]; then
+        save_previous /etc/resolv.conf
         rscf=`mktemp /tmp/XXXXXX`;
         echo '; generated by /sbin/dhclient-script' > $rscf
 
-        if [ -z "$SEARCH" ]; then
+        if [ -n "$SEARCH" ]; then
+            echo "search $SEARCH" >> $rscf
+        else
             if [ -n "$new_domain_search" ]; then
                 echo "search ${new_domain_search//\\032/ }" >> $rscf
-            else
-                if [ -n "$new_domain_name" ]; then
-                    echo "search ${new_domain_name//\\032/ }" >> $rscf
-                fi
+            elif [ -n "$new_domain_name" ]; then
+                echo "search ${new_domain_name//\\032/ }" >> $rscf
             fi
-        else
-            echo "search $SEARCH" >> $rscf
         fi
 
         if [ -n "$RES_OPTIONS" ]; then
@@ -409,6 +411,9 @@
     elif [ -n "$new_ntp_servers" ] && [ -e /etc/ntp.conf ]; then
         save_previous /etc/ntp.conf
         /bin/egrep -v '^server .*  # added by /sbin/dhclient-script$'< /etc/ntp.conf.predhclient.$interface > /etc/ntp.conf
+        if [ -x /sbin/restorecon ]; then
+            /sbin/restorecon /etc/ntp.conf >/dev/null 2>&1
+        fi
 
         for s in $new_ntp_servers; do
             echo "server $s  # added by /sbin/dhclient-script" >> /etc/ntp.conf




More information about the fedora-extras-commits mailing list