Commit 97b1d257 authored by Simon Kelley's avatar Simon Kelley

Correct logic for when to start helper.

parent 33702ab1
...@@ -249,7 +249,7 @@ int main (int argc, char **argv) ...@@ -249,7 +249,7 @@ int main (int argc, char **argv)
The script subsystrm relies on DHCP buffers, hence the last two The script subsystrm relies on DHCP buffers, hence the last two
conditions below. */ conditions below. */
if (daemon->dhcp || daemon->doing_dhcp6 || daemon->relay4 || if (daemon->dhcp || daemon->doing_dhcp6 || daemon->relay4 ||
daemon->relay6 || option_bool(OPT_TFTP) || option_bool(OPT_ADD_MAC)) daemon->relay6 || option_bool(OPT_TFTP) || option_bool(OPT_DNS_CLIENT))
{ {
dhcp_common_init(); dhcp_common_init();
if (daemon->dhcp || daemon->doing_dhcp6) if (daemon->dhcp || daemon->doing_dhcp6)
...@@ -556,7 +556,7 @@ int main (int argc, char **argv) ...@@ -556,7 +556,7 @@ int main (int argc, char **argv)
/* if we are to run scripts, we need to fork a helper before dropping root. */ /* if we are to run scripts, we need to fork a helper before dropping root. */
daemon->helperfd = -1; daemon->helperfd = -1;
#ifdef HAVE_SCRIPT #ifdef HAVE_SCRIPT
if ((daemon->dhcp || daemon->dhcp6 || option_bool(OPT_TFTP) || option_bool(OPT_ADD_MAC)) && if ((daemon->dhcp || daemon->dhcp6 || option_bool(OPT_TFTP) || option_bool(OPT_DNS_CLIENT)) &&
(daemon->lease_change_command || daemon->luascript)) (daemon->lease_change_command || daemon->luascript))
daemon->helperfd = create_helper(pipewrite, err_pipe[1], script_uid, script_gid, max_fd); daemon->helperfd = create_helper(pipewrite, err_pipe[1], script_uid, script_gid, max_fd);
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment