2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 22:05:46 +00:00

changed mail_argv[] def

now use EXEC() macro
This commit is contained in:
Todd C. Miller
1994-05-29 22:36:19 +00:00
parent 82eebb8179
commit 7e8d543af2

View File

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