]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- dhclient now closes its descriptor to dhclient.leases prior to executing
authorDavid Hankins <dhankins@isc.org>
Thu, 26 Apr 2007 19:31:58 +0000 (19:31 +0000)
committerDavid Hankins <dhankins@isc.org>
Thu, 26 Apr 2007 19:31:58 +0000 (19:31 +0000)
  dhclient-script.  Thanks to a patch from Tomas Pospisek. [ISC-Bugs #16728]

RELNOTES
client/dhclient.c

index 4d0084d11378767154de5bdaad791bcd73b2bc55..c3ea5073ad5db86c8245548e8db0b2a8d8f7a9cc 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -199,6 +199,11 @@ the README file.
 - Encapsulated option spaces within encapsulated option spaces is now
   formally supported.
 
+*** for merge
+- dhclient now closes its descriptor to dhclient.leases prior to executing
+  dhclient-script.  Thanks to a patch from Tomas Pospisek.
+***
+
                        Changes since 3.0.5
 
 - A logic error in omapi interface code was repaired that might result in
index 0870e07fdac92a0481073aedd39ddea3ed886fc6..c3324b08bf4ac2d1d6f6d90bf3657ca44236c92e 100644 (file)
@@ -32,7 +32,7 @@
 
 #ifndef lint
 static char ocopyright[] =
-"$Id: dhclient.c,v 1.145 2007/04/03 14:57:53 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium.  All rights reserved.\n";
+"$Id: dhclient.c,v 1.146 2007/04/26 19:31:58 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -2650,6 +2650,11 @@ int script_go (client)
                        wstatus = 0;
                }
        } else {
+               /* We don't want to pass an open file descriptor for
+                * dhclient.leases when executing dhclient-script.
+                */
+               if (leaseFile != NULL)
+                       fclose(leaseFile);
                execve (scriptName, argv, envp);
                log_error ("execve (%s, ...): %m", scriptName);
                exit (0);