send_mail() was calling find_path() which is wrong since find_path()

stores cmnd in a static var.  Anyhow, it doesn't make much sense
since MAILER should always be fully qualified
This commit is contained in:
Todd C. Miller
1995-04-11 04:38:34 +00:00
parent 9d82a8dace
commit f200df0029

View File

@@ -410,7 +410,7 @@ static char *mail_argv[] = { "sendmail",
static void send_mail()
{
char *mailer;
char *mailer = MAILER;
char *subject = MAILSUBJECT;
int fd[2];
char buf[MAXLOGLEN + BUFSIZ];
@@ -420,11 +420,6 @@ static void send_mail()
(void) memset((VOID *)&action, 0, sizeof(action));
#endif /* POSIX_SIGNALS */
if ((mailer = find_path(MAILER)) == NULL) {
(void) fprintf(stderr, "%s: mailer (%s) not found\n", Argv[0], MAILER);
exit(1);
}
/* catch children as they die */
#ifdef POSIX_SIGNALS
action.sa_handler = reapchild;