Your message dated Sat, 12 Jan 2008 16:43:37 +1000
with message-id <[EMAIL PROTECTED]>
has caused the Debian Bug report #440200,
regarding dhcp-client leases file incorrect error handling
to be marked as having been forwarded to the upstream software
author(s) [EMAIL PROTECTED]
(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere. Please contact me immediately.)
Debian bug tracking system administrator
(administrator, Debian Bugs database)
--- Begin Message ---
Hello,
This bug was filed a while ago, but it's really not a packaging issue, so
I'm forwarding it upstream to you.
Please maintain the Cc line for any replies so that our bug tracking system
is kept in the loop.
regards
Andrew
----- Forwarded message from Ian Jackson <[EMAIL PROTECTED]> -----
From: Ian Jackson <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Bug#440200: dhcp-client leases file incorrect error handling
Date: Thu, 30 Aug 2007 17:22:42 +0100
X-Mailer: VM 7.03 under Emacs 19.34.1
Package: dhcp3
Version:3.0.6-1
Following some testing I was reviewing the code in dhcp3-client which
handles the client leases file, and based on my inspection of the code
I think there are bugs in the error handling of writes to this file.
* write_client_lease assumes that errno will only be set nonzero by
failed writes. This is not guaranteed; you _are_ guaranteed that
errno will be set if an error occurs but you're _not_ guaranteed
that successful calls to libc functions do not set errno.
* write_client_lease is capable of writing corrupt lease
records if some but not all of the fprintfs fail. In particular,
if an earlier fprintf fails but a later one success (for example
because the disk is full for the first write and not for the
second) then the file could contain syntax errors or even incorrect
information. The code in dhcp3-client should abandon the efforts to
write more text if any prior write fails. If any write fails then
the next update must be done with rewrite_client_leases since the
exact contents of the old leases file are not known.
* rewrite_client_leases should write the new leases file out to a
temporary file and use rename(2) to install it. This will ensure
that in case of write errors at least the previous file is
preserved.
I imagine that there are similar mistakes in other parts of the dhcp3
source.
Ian.
----- End forwarded message -----
signature.asc
Description: Digital signature
--- End Message ---