diff options
Diffstat (limited to 'contrib/sendmail/src/main.c')
-rw-r--r-- | contrib/sendmail/src/main.c | 57 |
1 files changed, 27 insertions, 30 deletions
diff --git a/contrib/sendmail/src/main.c b/contrib/sendmail/src/main.c index 1bbb070..4d2318f 100644 --- a/contrib/sendmail/src/main.c +++ b/contrib/sendmail/src/main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2006, 2008, 2009 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2006, 2008, 2009, 2011 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -26,7 +26,7 @@ SM_UNUSED(static char copyright[]) = The Regents of the University of California. All rights reserved.\n"; #endif /* ! lint */ -SM_RCSID("@(#)$Id: main.c,v 8.971 2009/12/18 17:08:01 ca Exp $") +SM_RCSID("@(#)$Id: main.c,v 8.976 2011/03/15 23:14:36 ca Exp $") #if NETINET || NETINET6 @@ -304,6 +304,9 @@ main(argc, argv, envp) SubmitMode = SUBMIT_UNKNOWN; #if _FFR_LOCAL_DAEMON LocalDaemon = false; +# if NETINET6 + V6LoopbackAddrFound = false; +# endif /* NETINET6 */ #endif /* _FFR_LOCAL_DAEMON */ #if XDEBUG checkfd012("after openlog"); @@ -1308,7 +1311,7 @@ main(argc, argv, envp) (void) getfallbackmxrr(FallbackMX); #endif /* NAMED_BIND */ - if (SuperSafe == SAFE_INTERACTIVE && CurEnv->e_sendmode != SM_DELIVER) + if (SuperSafe == SAFE_INTERACTIVE && !SM_IS_INTERACTIVE(CurEnv->e_sendmode)) { (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, "WARNING: SuperSafe=interactive should only be used with\n DeliveryMode=interactive\n"); @@ -3190,7 +3193,7 @@ sigpipe(sig) ** may resend a message. ** ** Parameters: -** none. +** sig -- incoming signal. ** ** Returns: ** none. @@ -3201,8 +3204,6 @@ sigpipe(sig) ** NOTE: THIS CAN BE CALLED FROM A SIGNAL HANDLER. DO NOT ADD ** ANYTHING TO THIS ROUTINE UNLESS YOU KNOW WHAT YOU ARE ** DOING. -** -** XXX: More work is needed for this signal handler. */ /* ARGSUSED */ @@ -3217,38 +3218,34 @@ intsig(sig) errno = save_errno; CHECK_CRITICAL(sig); sm_allsignals(true); + IntSig = true; - if (sig != 0 && LogLevel > 79) - sm_syslog(LOG_DEBUG, CurEnv->e_id, "interrupt"); FileName = NULL; /* Clean-up on aborted stdin message submission */ - if (CurEnv->e_id != NULL && - (OpMode == MD_SMTP || + if (OpMode == MD_SMTP || OpMode == MD_DELIVER || - OpMode == MD_ARPAFTP)) + OpMode == MD_ARPAFTP) { - register ADDRESS *q; - - /* don't return an error indication */ - CurEnv->e_to = NULL; - CurEnv->e_flags &= ~EF_FATALERRS; - CurEnv->e_flags |= EF_CLRQUEUE; - - /* - ** Spin through the addresses and - ** mark them dead to prevent bounces - */ - - for (q = CurEnv->e_sendqueue; q != NULL; q = q->q_next) - q->q_state = QS_DONTSEND; - - drop = true; + if (CurEnv->e_id != NULL) + { + char *fn; + + fn = queuename(CurEnv, DATAFL_LETTER); + if (fn != NULL) + (void) unlink(fn); + fn = queuename(CurEnv, ANYQFL_LETTER); + if (fn != NULL) + (void) unlink(fn); + } + _exit(EX_OK); + /* NOTREACHED */ } - else if (OpMode != MD_TEST) - { + + if (sig != 0 && LogLevel > 79) + sm_syslog(LOG_DEBUG, CurEnv->e_id, "interrupt"); + if (OpMode != MD_TEST) unlockqueue(CurEnv); - } finis(drop, false, EX_OK); /* NOTREACHED */ |