diff options
author | David Hankins <dhankins@isc.org> | 2007-04-26 19:31:58 +0000 |
---|---|---|
committer | David Hankins <dhankins@isc.org> | 2007-04-26 19:31:58 +0000 |
commit | 4d97a043e42cb0145fd849559ae0bfaf01b9cfb3 (patch) | |
tree | 282a16381bc3114200ff53c9c3861e71186dd396 | |
parent | 68287bde84d62a25462188bf0784770e255ea5df (diff) | |
download | isc-dhcp-4d97a043e42cb0145fd849559ae0bfaf01b9cfb3.tar.gz |
- dhclient now closes its descriptor to dhclient.leases prior to executing
dhclient-script. Thanks to a patch from Tomas Pospisek. [ISC-Bugs #16728]
-rw-r--r-- | RELNOTES | 5 | ||||
-rw-r--r-- | client/dhclient.c | 7 |
2 files changed, 11 insertions, 1 deletions
@@ -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 diff --git a/client/dhclient.c b/client/dhclient.c index 0870e07f..c3324b08 100644 --- a/client/dhclient.c +++ b/client/dhclient.c @@ -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); |