If openvpn_execve() is not able to fork(), it would not make any noise
about it. So this patch adds a log notification if this happens.
In addition, if openvpn_execve() is called with an empty argv array,
it should exit instantly. This is not expected to happen at all and
might indicate a much more serious issue (or programming error)
somewhere else in the code. Thus, abort execution to get these issues
flushed out as quickly as possible.
Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
exit (127);
}
else if (pid < (pid_t)0) /* fork failed */
- ;
+ msg (M_ERR, "openvpn_execve: unable to fork");
else /* parent side */
{
if (waitpid (pid, &ret, 0) != pid)
}
else
{
- msg (M_WARN, "openvpn_execve: called with empty argv");
+ msg (M_FATAL, "openvpn_execve: called with empty argv");
}
gc_free (&gc);