* ala execvp(3) if we get ENOEXEC.
*/
int
-sudo_execve(const char *path, char *const argv[], char *const envp[], int noexec)
+sudo_execve(const char *path, char *const argv[], char *const envp[], bool noexec)
{
/* Modify the environment as needed to disable further execve(). */
if (noexec)
memcpy(&nargv[2], &argv[1], argc * sizeof(char *)); /* copies NULL */
/* sesh will handle noexec for us. */
- sudo_execve(sesh, nargv, envp, 0);
+ sudo_execve(sesh, nargv, envp, false);
serrno = errno;
free(nargv);
errno = serrno;
main(int argc, char *argv[], char *envp[])
{
char *cp, *cmnd;
- int noexec = 0;
+ bool noexec = false;
debug_decl(main, SUDO_DEBUG_MAIN)
setlocale(LC_ALL, "");
/* exec.c */
struct sudo_event_base;
-int sudo_execve(const char *path, char *const argv[], char *const envp[], int noexec);
+int sudo_execve(const char *path, char *const argv[], char *const envp[], bool noexec);
extern volatile pid_t cmnd_pid;
/* exec_pty.c */