rpms/dhcpv6/devel dhcpv6-0.10-init_leases.patch, NONE, 1.1 dhcpv6.spec, 1.61, 1.62
David Cantrell (dcantrel)
fedora-extras-commits at redhat.com
Tue Sep 4 17:56:20 UTC 2007
Author: dcantrel
Update of /cvs/pkgs/rpms/dhcpv6/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16726
Modified Files:
dhcpv6.spec
Added Files:
dhcpv6-0.10-init_leases.patch
Log Message:
* Tue Sep 04 2007 David Cantrell <dcantrell at redhat.com> - 0.10-47
- Do not parse an empty /var/lib/dhcpv6/server6.leases file (#253968)
dhcpv6-0.10-init_leases.patch:
--- NEW FILE dhcpv6-0.10-init_leases.patch ---
diff -up dhcp-0.10/lease.c.init_leases dhcp-0.10/lease.c
--- dhcp-0.10/lease.c.init_leases 2007-09-04 12:25:35.000000000 -0400
+++ dhcp-0.10/lease.c 2007-09-04 13:48:44.000000000 -0400
@@ -180,18 +180,25 @@ FILE *
init_leases(const char *name)
{
FILE *file;
+ struct stat stbuf;
file = fopen(name, "a+");
if(!file) {
dprintf(LOG_ERR, "%s" "could not open lease file", FNAME);
return (NULL);
}
+ if (!lstat(file, &stbuf)) {
+ dprintf(LOG_ERR, "%s" "could not stat lease file", FNAME);
+ return (NULL);
+ }
if (dhcp6_mode == DHCP6_MODE_SERVER) {
if (0 != init_lease_hashes()) {
dprintf(LOG_ERR, "%s" "Could not initialize hash arrays", FNAME);
return (NULL);
}
}
- lease_parse(file);
+ if (stbuf.st_size > 0 ) {
+ lease_parse(file);
+ }
return file;
}
Index: dhcpv6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dhcpv6/devel/dhcpv6.spec,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- dhcpv6.spec 21 Aug 2007 15:34:14 -0000 1.61
+++ dhcpv6.spec 4 Sep 2007 17:55:48 -0000 1.62
@@ -1,7 +1,7 @@
Summary: DHCPv6 - DHCP server and client for IPv6
Name: dhcpv6
Version: 0.10
-Release: 46%{?dist}
+Release: 47%{?dist}
License: BSD
Group: System Environment/Daemons
URL: http://dhcpv6.sourceforge.net/
@@ -16,6 +16,7 @@
Patch4: %{name}-0.10-no-strlcat.patch
Patch5: %{name}-0.10-salen.patch
Patch6: %{name}-0.10-initscripts.patch
+Patch7: %{name}-0.10-init_leases.patch
Patch99: %{name}-0.10-libdhcp6client.patch
@@ -79,6 +80,7 @@
%patch4 -p1 -b .no_strlcat
%patch5 -p1 -b .salen
%patch6 -p1 -b .initscripts
+%patch7 -p1 -b .init_leases
%patch99 -p1 -b .libdhcp6client
@@ -173,6 +175,9 @@
%{_libdir}/libdhcp6client.a
%changelog
+* Tue Sep 04 2007 David Cantrell <dcantrell at redhat.com> - 0.10-47
+- Do not parse an empty /var/lib/dhcpv6/server6.leases file (#253968)
+
* Tue Aug 21 2007 David Cantrell <dcantrell at redhat.com> - 0.10-46
- Rebuild
More information about the fedora-extras-commits
mailing list