rpms/dhcp/devel dhcp-4.0.0-garbage-chars.patch, NONE, 1.1 dhcp.spec, 1.214, 1.215 linux, 1.15, 1.16

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


Author: dcantrel

Update of /cvs/pkgs/rpms/dhcp/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12301

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-19
- 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/devel/dhcp.spec,v
retrieving revision 1.214
retrieving revision 1.215
diff -u -r1.214 -r1.215
--- dhcp.spec	3 Aug 2008 20:28:49 -0000	1.214
+++ dhcp.spec	6 Aug 2008 19:49:47 -0000	1.215
@@ -4,7 +4,7 @@
 Summary:  DHCP (Dynamic Host Configuration Protocol) server and relay agent
 Name:     dhcp
 Version:  4.0.0
-Release:  18%{?dist}
+Release:  19%{?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
@@ -199,6 +200,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/
@@ -230,13 +234,13 @@
 popd
 
 # Filter false positive perl requires (all of them)
-cat <<EOF > %{name}-req
+%{__cat} << EOF > %{name}-req
 #!/bin/sh
 %{__perl_requires} \
-| grep -v 'perl('
+| %{__grep} -v 'perl('
 EOF
 %define __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req
-chmod +x %{__perl_requires}
+%{__chmod} +x %{__perl_requires}
 
 # Replace @PRODUCTNAME@
 %{__sed} -i -e 's|@PRODUCTNAME@|%{vvendor}|g' common/dhcp-options.5
@@ -436,6 +440,11 @@
 %{_libdir}/libdhcp4client.so
 
 %changelog
+* Wed Aug 06 2008 David Cantrell <dcantrell at redhat.com> - 12:4.0.0-19
+- 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)
+
 * Sun Aug 03 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 12:4.0.0-18
 - filter out false positive perl requires
 


Index: linux
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/devel/linux,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- linux	1 Aug 2008 21:16:41 -0000	1.15
+++ linux	6 Aug 2008 19:49:47 -0000	1.16
@@ -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