execve -> execv

This commit is contained in:
Todd C. Miller
1994-02-28 05:27:51 +00:00
parent beaf4c0f3b
commit eea6d47b7f
3 changed files with 15 additions and 15 deletions

View File

@@ -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);

10
sudo.c
View File

@@ -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.
*/

4
sudo.h
View File

@@ -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
/*