rpms/dhcp/F-11 dhcp-4.1.0-lease-file-semicolons.patch, NONE, 1.1 dhcp.spec, 1.258, 1.259

David Cantrell dcantrel at fedoraproject.org
Wed Aug 5 04:11:02 UTC 2009


Author: dcantrel

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

Modified Files:
	dhcp.spec 
Added Files:
	dhcp-4.1.0-lease-file-semicolons.patch 
Log Message:
* Tue Aug 04 2009 David Cantrell <dcantrell at redhat.com> - 12:4.1.0-24
- Correct lease file format written by dhclient (#514828)


dhcp-4.1.0-lease-file-semicolons.patch:
 dhclient.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

--- NEW FILE dhcp-4.1.0-lease-file-semicolons.patch ---
diff -up dhcp-4.1.0/client/dhclient.c.semicolons dhcp-4.1.0/client/dhclient.c
--- dhcp-4.1.0/client/dhclient.c.semicolons	2008-06-11 10:17:10.000000000 -1000
+++ dhcp-4.1.0/client/dhclient.c	2009-08-04 17:46:38.000000000 -1000
@@ -2780,7 +2780,7 @@ write_client6_lease(struct client_state 
 			if (addr->options != NULL)
 				write_options(client, addr->options, "      ");
 
-			stat = fprintf(leaseFile, "    }\n");
+			stat = fprintf(leaseFile, "    };\n");
 			if (stat <= 0)
 				return ISC_R_IOERROR;
 		}
@@ -2788,7 +2788,7 @@ write_client6_lease(struct client_state 
 		if (ia->options != NULL)
 			write_options(client, ia->options, "    ");
 
-		stat = fprintf(leaseFile, "  }\n");
+		stat = fprintf(leaseFile, "  };\n");
 		if (stat <= 0)
 			return ISC_R_IOERROR;
 	}
@@ -2802,7 +2802,7 @@ write_client6_lease(struct client_state 
 	if (lease->options != NULL)
 		write_options(client, lease->options, "  ");
 
-	stat = fprintf(leaseFile, "}\n");
+	stat = fprintf(leaseFile, "};\n");
 	if (stat <= 0)
 		return ISC_R_IOERROR;
 
@@ -2926,20 +2926,20 @@ int write_client_lease (client, lease, r
 
 	tval = print_time(lease->renewal);
 	if (tval == NULL ||
-	    fprintf(leaseFile, "  renew %s\n", tval) < 0)
+	    fprintf(leaseFile, "  renew %s;\n", tval) < 0)
 		errors++;
 
 	tval = print_time(lease->rebind);
 	if (tval == NULL ||
-	    fprintf(leaseFile, "  rebind %s\n", tval) < 0)
+	    fprintf(leaseFile, "  rebind %s;\n", tval) < 0)
 		errors++;
 
 	tval = print_time(lease->expiry);
 	if (tval == NULL ||
-	    fprintf(leaseFile, "  expire %s\n", tval) < 0)
+	    fprintf(leaseFile, "  expire %s;\n", tval) < 0)
 		errors++;
 
-	if (fprintf(leaseFile, "}\n") < 0)
+	if (fprintf(leaseFile, "};\n") < 0)
 		errors++;
 
 	if (fflush(leaseFile) != 0)


Index: dhcp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dhcp/F-11/dhcp.spec,v
retrieving revision 1.258
retrieving revision 1.259
diff -u -p -r1.258 -r1.259
--- dhcp.spec	2 Jul 2009 21:34:57 -0000	1.258
+++ dhcp.spec	5 Aug 2009 04:11:02 -0000	1.259
@@ -10,7 +10,7 @@
 Summary:  Dynamic host configuration protocol software
 Name:     dhcp
 Version:  4.1.0
-Release:  23%{?dist}
+Release:  24%{?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.
@@ -47,6 +47,7 @@ Patch17:  %{name}-4.1.0-invalid-dhclient
 Patch18:  %{name}-4.1.0-missing-ipv6-not-fatal.patch
 Patch19:  %{name}-4.1.0-IFNAMSIZ.patch
 Patch20:  %{name}-4.1.0-add_timeout_when_NULL.patch
+Patch21:  %{name}-4.1.0-lease-file-semicolons.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: autoconf
@@ -199,6 +200,9 @@ libdhcpctl and libomapi static libraries
 # (Submitted to dhcp-bugs at isc.org - [ISC-Bugs #19867])
 %patch20 -p1
 
+# Add missing semicolons to lines in the client lease file (#514828)
+%patch21 -p1
+
 # Copy in documentation and example scripts for LDAP patch to dhcpd
 %{__install} -p -m 0755 ldap-for-dhcp-%{ldappatchver}/dhcpd-conf-to-ldap contrib/
 
@@ -444,6 +448,9 @@ fi
 %attr(0644,root,root) %{_mandir}/man3/omapi.3.gz
 
 %changelog
+* Tue Aug 04 2009 David Cantrell <dcantrell at redhat.com> - 12:4.1.0-24
+- Correct lease file format written by dhclient (#514828)
+
 * Thu Jul 02 2009 David Cantrell <dcantrell at redhat.com> - 12:4.1.0-23
 - Correct problems when upgrading from a previous release and your
   dhcpd.conf file not being placed in /etc/dhcp (#506600)




More information about the fedora-extras-commits mailing list