]> granicus.if.org Git - sudo/commitdiff
changed mail_argv[] def
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 29 May 1994 22:36:19 +0000 (22:36 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 29 May 1994 22:36:19 +0000 (22:36 +0000)
now use EXEC() macro

logging.c

index 4f7202b762ef7346c3a77e521dacdcdb6d9dc343..6bb7989c10d04a67370f03003fd1d8ce76f58da3 100644 (file)
--- a/logging.c
+++ b/logging.c
@@ -350,10 +350,10 @@ void log_error(code)
  *
  */
 
-const char *mail_argv[] = {"sendmail",
-                    "-t",
-                    ALERTMAIL,
-                    (char *) NULL};
+static char *mail_argv[] = { "sendmail",
+                            "-t",
+                            ALERTMAIL,
+                            (char *) NULL };
 
 static void send_mail()
 {
@@ -399,18 +399,10 @@ static void send_mail()
 
     if (!fork()) {             /* child */
        (void) close(1);
-#ifdef USE_EXECV
-       execv(mailer, mail_argv);
-#else /* USE_EXECV */
-       execvp(mailer, mail_argv);
-#endif /* USE_EXECV */
+       EXEC(mailer, mail_argv);
 
        /* this should not happen */
-#ifdef USE_EXECV
-       perror("execv");
-#else /* USE_EXECV */
-       perror("execvp");
-#endif /* USE_EXECV */
+       perror(mailer);
        exit(1);
     } else {                   /* parent */
        (void) close(0);