Fill in cstat if exec_setup() fails. Previously it was only filled

in for an execve() failure.  Fixes an unkillable sudo process when
exec_setup() fails and I/O logging is enabled.
This commit is contained in:
Todd C. Miller
2015-09-09 10:50:21 -06:00
parent 27c2a3d158
commit d08faa73a7

View File

@@ -184,11 +184,11 @@ exec_cmnd(struct command_details *details, struct command_status *cstat,
sudo_execve(details->command, details->argv, details->envp,
ISSET(details->flags, CD_NOEXEC));
}
}
cstat->type = CMD_ERRNO;
cstat->val = errno;
sudo_debug_printf(SUDO_DEBUG_ERROR, "unable to exec %s: %s",
details->command, strerror(errno));
}
debug_return;
}