File dhcp-4.1.1-dhclient-exec-filedes.diff of Package dhcp
diff --git a/client/dhclient.c b/client/dhclient.c
index 69dcc91..15c31a5 100644
--- a/client/dhclient.c
+++ b/client/dhclient.c
@@ -3173,6 +3173,12 @@ int script_go (client)
*/
if (leaseFile != NULL)
fclose(leaseFile);
+ if ((i = open("/dev/null", O_RDWR)) != -1) {
+ dup2(i, STDIN_FILENO);
+ dup2(i, STDOUT_FILENO);
+ if (i > STDERR_FILENO)
+ close(i);
+ }
execve (scriptName, argv, envp);
log_error ("execve (%s, ...): %m", scriptName);
exit (0);