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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user