]> granicus.if.org Git - sudo/commitdiff
execve -> execv
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 28 Feb 1994 05:27:51 +0000 (05:27 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 28 Feb 1994 05:27:51 +0000 (05:27 +0000)
logging.c
sudo.c
sudo.h

index c19dc89b88496b9e7863fb96958e1a5c355b47f6..6fa1cbddc84263fb353e2cf7220233970bbd5f1b 100644 (file)
--- 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 15d83ee38eaf1dbd1125615605ec34b0baaf6a4f..1f5b88d4ce095a9ed6305b27674a7e3c53fa00f8 100644 (file)
--- 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 d739634153db442b31e9593a2d0478e4a7b9ea9c..59e58310e9a98dee878497a1ca886a80ff38d60a 100644 (file)
--- a/sudo.h
+++ b/sudo.h
  
            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
 
 /*