From: Todd C. Miller Date: Mon, 28 Feb 1994 05:27:51 +0000 (+0000) Subject: execve -> execv X-Git-Tag: SUDO_1_3_1~310 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eea6d47b7f7520fbcb132b819f1ec9bb92a46926;p=sudo execve -> execv --- diff --git a/logging.c b/logging.c index c19dc89b8..6fa1cbddc 100644 --- a/logging.c +++ b/logging.c @@ -392,18 +392,18 @@ static void send_mail() if (!fork()) { /* child */ (void) close(1); -#ifdef USE_EXECVE - execve(mailer, exec_argv, environ); -#else /* USE_EXECVE */ +#ifdef USE_EXECV + execv(mailer, exec_argv); +#else /* USE_EXECV */ execvp(mailer, exec_argv); -#endif /* USE_EXECVE */ +#endif /* USE_EXECV */ /* this should not happen */ -#ifdef USE_EXECVE - perror("execve"); -#else /* USE_EXECVE */ +#ifdef USE_EXECV + perror("execv"); +#else /* USE_EXECV */ perror("execvp"); -#endif /* USE_EXECVE */ +#endif /* USE_EXECV */ exit(1); } else { /* parent */ (void) close(0); diff --git a/sudo.c b/sudo.c index 15d83ee38..1f5b88d4c 100644 --- a/sudo.c +++ b/sudo.c @@ -144,11 +144,11 @@ main(argc, argv) check_user(); log_error(ALL_SYSTEMS_GO); be_root(); -#ifdef USE_EXECVE - execve(cmnd, &Argv[1]); -#else /* USE_EXECVE */ +#ifdef USE_EXECV + execv(cmnd, &Argv[1]); +#else /* USE_EXECV */ execvp(cmnd, &Argv[1]); -#endif /* USE_EXECVE */ +#endif /* USE_EXECV */ perror(cmnd); /* exec failed! */ exit(-1); break; @@ -276,7 +276,7 @@ static void usage() * * clean_env() * - * This function builds cleans up the environ pointer so that all execvp()'s + * This function builds cleans up the environ pointer so that all execv*()'s * omit LD_* variables and hard-code PATH if SECURE_PATH is defined. */ diff --git a/sudo.h b/sudo.h index d73963415..59e58310e 100644 --- a/sudo.h +++ b/sudo.h @@ -110,7 +110,7 @@ STD_HEADERS if you have ansi-compliant header files - USE_EXECVE if you want to use execve() instead of + USE_EXECV if you want to use execv() instead of execvp() */ @@ -337,7 +337,7 @@ extern char ** environ; * For OS's w/o mode_t */ #ifdef NO_MODE_T -typedef int mode_t +typedef int mode_t; #endif /*