diff options
Diffstat (limited to 'contrib/sendmail/src')
-rw-r--r-- | contrib/sendmail/src/Makefile.m4 | 2 | ||||
-rw-r--r-- | contrib/sendmail/src/TRACEFLAGS | 15 | ||||
-rw-r--r-- | contrib/sendmail/src/collect.c | 5 | ||||
-rw-r--r-- | contrib/sendmail/src/conf.c | 30 | ||||
-rw-r--r-- | contrib/sendmail/src/daemon.c | 5 | ||||
-rw-r--r-- | contrib/sendmail/src/deliver.c | 19 | ||||
-rw-r--r-- | contrib/sendmail/src/headers.c | 6 | ||||
-rw-r--r-- | contrib/sendmail/src/main.c | 8 | ||||
-rw-r--r-- | contrib/sendmail/src/map.c | 14 | ||||
-rw-r--r-- | contrib/sendmail/src/milter.c | 224 | ||||
-rw-r--r-- | contrib/sendmail/src/parseaddr.c | 3 | ||||
-rw-r--r-- | contrib/sendmail/src/queue.c | 25 | ||||
-rw-r--r-- | contrib/sendmail/src/sasl.c | 14 | ||||
-rw-r--r-- | contrib/sendmail/src/savemail.c | 34 | ||||
-rw-r--r-- | contrib/sendmail/src/sendmail.h | 28 | ||||
-rw-r--r-- | contrib/sendmail/src/srvrsmtp.c | 22 | ||||
-rw-r--r-- | contrib/sendmail/src/stab.c | 8 | ||||
-rw-r--r-- | contrib/sendmail/src/util.c | 17 | ||||
-rw-r--r-- | contrib/sendmail/src/version.c | 6 |
19 files changed, 287 insertions, 198 deletions
diff --git a/contrib/sendmail/src/Makefile.m4 b/contrib/sendmail/src/Makefile.m4 index 7bcd24d..5908b97 100644 --- a/contrib/sendmail/src/Makefile.m4 +++ b/contrib/sendmail/src/Makefile.m4 @@ -1,4 +1,4 @@ -dnl $Id: Makefile.m4,v 8.126 2010/11/24 19:59:54 gshapiro Exp $ +dnl $Id: Makefile.m4,v 8.132 2012/09/11 20:02:44 ca Exp $ include(confBUILDTOOLSDIR`/M4/switch.m4') define(`confREQUIRE_LIBSM', `true') diff --git a/contrib/sendmail/src/TRACEFLAGS b/contrib/sendmail/src/TRACEFLAGS index 6fdfdd9..c3f0266 100644 --- a/contrib/sendmail/src/TRACEFLAGS +++ b/contrib/sendmail/src/TRACEFLAGS @@ -1,4 +1,4 @@ -# $Id: TRACEFLAGS,v 8.48 2008/11/03 21:09:26 gshapiro Exp $ +# $Id: TRACEFLAGS,v 8.52 2012/03/03 00:10:42 ca Exp $ 0, 4 main.c main canonical name, UUCP node name, a.k.a.s 0, 15 main.c main print configuration 0, 44 util.c printav print address of each string @@ -77,12 +77,12 @@ 63 queue.c runqueue process watching 64 multiple Milter 65 main.c permission checks -#if _FFR_ADAPTIVE_EOL -66 srvrsmtp.c conformance checks -#endif /* _FFR_ADAPTIVE_EOL */ -#if _FFR_QUEUE_SCHED_DBG -69 queue.c scheduling -#endif /* _FFR_QUEUE_SCHED_DBG */ +#if _FFR_ADAPTIVE_EOL +66 srvrsmtp.c conformance checks +#endif /* _FFR_ADAPTIVE_EOL */ +#if _FFR_QUEUE_SCHED_DBG +69 queue.c scheduling +#endif /* _FFR_QUEUE_SCHED_DBG */ 70 queue.c quarantining 71,>99 milter.c quarantine on errors 73 queue.c shared memory updates @@ -92,6 +92,7 @@ 83 collect.c timeout 84 deliver.c timeout 85 map.c dprintf map +89 conf.c >=8 use sm_dprintf() instead of syslog() 91 mci.c syslogging of MCI cache information 93,>99 * Prevent daemon connection fork for profiling/debugging 94,>99 srvrsmtp.c cause commands to fail (for protocol testing) diff --git a/contrib/sendmail/src/collect.c b/contrib/sendmail/src/collect.c index f5d7247..c8dcb8a 100644 --- a/contrib/sendmail/src/collect.c +++ b/contrib/sendmail/src/collect.c @@ -13,7 +13,7 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: collect.c,v 8.284 2008/08/06 05:26:24 ca Exp $") +SM_RCSID("@(#)$Id: collect.c,v 8.285 2012/06/14 23:54:02 ca Exp $") static void eatfrom __P((char *volatile, ENVELOPE *)); static void collect_doheader __P((ENVELOPE *)); @@ -869,7 +869,8 @@ readerr: if (LogLevel > 6) sm_syslog(LOG_NOTICE, e->e_id, "message size (%ld) exceeds maximum (%ld)", - e->e_msgsize, MaxMessageSize); + PRT_NONNEGL(e->e_msgsize), + MaxMessageSize); } } diff --git a/contrib/sendmail/src/conf.c b/contrib/sendmail/src/conf.c index ffc6f20..9130455 100644 --- a/contrib/sendmail/src/conf.c +++ b/contrib/sendmail/src/conf.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2010 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2012 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -13,7 +13,7 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: conf.c,v 8.1168 2011/01/25 18:31:30 ca Exp $") +SM_RCSID("@(#)$Id: conf.c,v 8.1176 2012/12/07 03:59:54 ca Exp $") #include <sm/sendmail.h> #include <sendmail/pathnames.h> @@ -53,7 +53,7 @@ static int add_hostnames __P((SOCKADDR *)); static struct hostent *sm_getipnodebyname __P((const char *, int, int, int *)); static struct hostent *sm_getipnodebyaddr __P((const void *, size_t, int, int *)); #else /* NETINET6 && NEEDSGETIPNODE */ -#define sm_getipnodebyname getipnodebyname +#define sm_getipnodebyname getipnodebyname #define sm_getipnodebyaddr getipnodebyaddr #endif /* NETINET6 && NEEDSGETIPNODE */ @@ -4602,6 +4602,10 @@ add_hostnames(sa) int save_errno = errno; if (LogLevel > 3 && +#if NETINET && defined(IN_LINKLOCAL) + !(sa->sa.sa_family == AF_INET && + IN_LINKLOCAL(ntohl(sa->sin.sin_addr.s_addr))) && +#endif /* NETINET && defined(IN_LINKLOCAL) */ #if NETINET6 !(sa->sa.sa_family == AF_INET6 && IN6_IS_ADDR_LINKLOCAL(&sa->sin6.sin6_addr)) && @@ -5374,14 +5378,30 @@ sm_syslog(level, id, fmt, va_alist) #if LOG if (*id == '\0') { - if (tTd(89, 8)) + if (tTd(89, 10)) + { + struct timeval tv; + + gettimeofday(&tv, NULL); + sm_dprintf("%ld.%06ld %s\n", (long) tv.tv_sec, + (long) tv.tv_usec, newstring); + } + else if (tTd(89, 8)) sm_dprintf("%s\n", newstring); else syslog(level, "%s", newstring); } else { - if (tTd(89, 8)) + if (tTd(89, 10)) + { + struct timeval tv; + + gettimeofday(&tv, NULL); + sm_dprintf("%ld.%06ld %s: %s\n", (long) tv.tv_sec, + (long) tv.tv_usec, id, newstring); + } + else if (tTd(89, 8)) sm_dprintf("%s: %s\n", id, newstring); else syslog(level, "%s: %s", id, newstring); diff --git a/contrib/sendmail/src/daemon.c b/contrib/sendmail/src/daemon.c index a1dcbe85..498f8c2 100644 --- a/contrib/sendmail/src/daemon.c +++ b/contrib/sendmail/src/daemon.c @@ -14,7 +14,7 @@ #include <sendmail.h> #include "map.h" -SM_RCSID("@(#)$Id: daemon.c,v 8.691 2011/01/25 18:31:30 ca Exp $") +SM_RCSID("@(#)$Id: daemon.c,v 8.694 2012/03/03 00:10:42 ca Exp $") #if defined(SOCK_STREAM) || defined(__GNU_LIBRARY__) # define USE_SOCK_STREAM 1 @@ -827,6 +827,7 @@ getrequests(e) OutChannel = outchannel; DisConnected = false; + #if XLA if (!xla_host_ok(RealHostName)) { @@ -4405,6 +4406,8 @@ hostnamebyanyaddr(sap) saveretry = _res.retry; if (_res.retry * _res.retrans > 20) _res.retry = 20 / _res.retrans; + if (_res.retry == 0) + _res.retry = 1; # endif /* NAMED_BIND */ switch (sap->sa.sa_family) diff --git a/contrib/sendmail/src/deliver.c b/contrib/sendmail/src/deliver.c index bb1d60e..581a98d 100644 --- a/contrib/sendmail/src/deliver.c +++ b/contrib/sendmail/src/deliver.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2010 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2010, 2012 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -14,7 +14,7 @@ #include <sendmail.h> #include <sm/time.h> -SM_RCSID("@(#)$Id: deliver.c,v 8.1024 2011/01/12 23:52:59 ca Exp $") +SM_RCSID("@(#)$Id: deliver.c,v 8.1027 2012/12/19 02:49:21 ca Exp $") #if HASSETUSERCONTEXT # include <login_cap.h> @@ -37,6 +37,7 @@ static void sendenvelope __P((ENVELOPE *, int)); static int coloncmp __P((const char *, const char *)); #if STARTTLS +# include <openssl/err.h> static int starttls __P((MAILER *, MCI *, ENVELOPE *)); static int endtlsclt __P((MCI *)); #endif /* STARTTLS */ @@ -4277,7 +4278,7 @@ logdelivery(m, mci, dsn, status, ctladdr, xstart, e) /* pri: changes with each delivery attempt */ (void) sm_snprintf(bp, SPACELEFT(buf, bp), ", pri=%ld", - e->e_msgpriority); + PRT_NONNEGL(e->e_msgpriority)); bp += strlen(bp); /* relay: max 66 bytes for IPv4 addresses */ @@ -6197,10 +6198,16 @@ ssl_retry: if (LogLevel > 5) { + unsigned long l; + const char *sr; + + l = ERR_peek_error(); + sr = ERR_reason_error_string(l); sm_syslog(LOG_WARNING, NOQID, - "STARTTLS=client, error: connect failed=%d, SSL_error=%d, errno=%d, retry=%d", - result, ssl_err, errno, i); - if (LogLevel > 8) + "STARTTLS=client, error: connect failed=%d, reason=%s, SSL_error=%d, errno=%d, retry=%d", + result, sr == NULL ? "unknown" : sr, ssl_err, + errno, i); + if (LogLevel > 9) tlslogerr("client"); } diff --git a/contrib/sendmail/src/headers.c b/contrib/sendmail/src/headers.c index c4bdc87..02f9663 100644 --- a/contrib/sendmail/src/headers.c +++ b/contrib/sendmail/src/headers.c @@ -14,7 +14,7 @@ #include <sendmail.h> #include <sm/sendmail.h> -SM_RCSID("@(#)$Id: headers.c,v 8.317 2008/08/27 20:11:55 gshapiro Exp $") +SM_RCSID("@(#)$Id: headers.c,v 8.318 2012/06/14 23:54:02 ca Exp $") static HDR *allocheader __P((char *, char *, int, SM_RPOOL_T *, bool)); static size_t fix_mime_header __P((HDR *, ENVELOPE *)); @@ -1152,7 +1152,7 @@ logsender(e, msgid) (void) sm_snprintf(sbp, SPACELEFT(sbuf, sbp), "from=%.200s, size=%ld, class=%d, nrcpts=%d", e->e_from.q_paddr == NULL ? "<NONE>" : e->e_from.q_paddr, - e->e_msgsize, e->e_class, e->e_nrcpts); + PRT_NONNEGL(e->e_msgsize), e->e_class, e->e_nrcpts); sbp += strlen(sbp); if (msgid != NULL) { @@ -1191,7 +1191,7 @@ logsender(e, msgid) 83)); sm_syslog(LOG_INFO, e->e_id, "size=%ld, class=%ld, nrcpts=%d", - e->e_msgsize, e->e_class, e->e_nrcpts); + PRT_NONNEGL(e->e_msgsize), e->e_class, e->e_nrcpts); if (msgid != NULL) sm_syslog(LOG_INFO, e->e_id, "msgid=%s", diff --git a/contrib/sendmail/src/main.c b/contrib/sendmail/src/main.c index e14ffa0..2294063 100644 --- a/contrib/sendmail/src/main.c +++ b/contrib/sendmail/src/main.c @@ -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.976 2011/03/15 23:14:36 ca Exp $") +SM_RCSID("@(#)$Id: main.c,v 8.981 2012/06/14 23:54:02 ca Exp $") #if NETINET || NETINET6 @@ -2561,6 +2561,10 @@ main(argc, argv, envp) authinfo = getauthinfo(sm_io_getinfo(InChannel, SM_IO_WHAT_FD, NULL), &forged); macdefine(&BlankEnvelope.e_macro, A_TEMP, '_', authinfo); + if (tTd(75, 9)) + sm_syslog(LOG_INFO, NOQID, + "main: where=after_getauthinfo, RealHostAddr=%s", + anynet_ntoa(&RealHostAddr)); /* at this point we are in a child: reset state */ sm_rpool_free(MainEnvelope.e_rpool); @@ -2827,7 +2831,7 @@ main(argc, argv, envp) /* set message size */ (void) sm_snprintf(buf, sizeof(buf), "%ld", - MainEnvelope.e_msgsize); + PRT_NONNEGL(MainEnvelope.e_msgsize)); macdefine(&MainEnvelope.e_macro, A_TEMP, macid("{msg_size}"), buf); diff --git a/contrib/sendmail/src/map.c b/contrib/sendmail/src/map.c index 2eb6958..01d79ff 100644 --- a/contrib/sendmail/src/map.c +++ b/contrib/sendmail/src/map.c @@ -13,7 +13,7 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: map.c,v 8.706 2010/07/27 03:35:42 ca Exp $") +SM_RCSID("@(#)$Id: map.c,v 8.709 2012/04/20 18:47:09 ca Exp $") #if LDAPMAP # include <sm/ldap.h> @@ -3434,7 +3434,7 @@ ldapmap_open(map, mode) { if (LogLevel > 1) sm_syslog(LOG_NOTICE, CurEnv->e_id, - "timeout conning to LDAP server %.100s", + "timeout connecting to LDAP server %.100s", id); } @@ -3763,11 +3763,11 @@ ldapmap_lookup(map, name, av, statp) if (!bitset(MF_OPTIONAL, map->map_mflags)) { if (bitset(MF_NODEFER, map->map_mflags)) - syserr("Error getting LDAP results in map %s", - map->map_mname); + syserr("Error getting LDAP results, map=%s, name=%s", + map->map_mname, name); else - syserr("451 4.3.5 Error getting LDAP results in map %s", - map->map_mname); + syserr("451 4.3.5 Error getting LDAP results, map=%s, name=%s", + map->map_mname, name); } errno = save_errno; return NULL; @@ -3781,7 +3781,7 @@ ldapmap_lookup(map, name, av, statp) { if (LogLevel > 9) sm_syslog(LOG_INFO, CurEnv->e_id, - "ldap %.100s => %s", name, + "ldap=%s, %.100s=>%s", map->map_mname, name, vp == NULL ? "<NULL>" : vp); if (bitset(MF_MATCHONLY, map->map_mflags)) result = map_rewrite(map, name, strlen(name), NULL); diff --git a/contrib/sendmail/src/milter.c b/contrib/sendmail/src/milter.c index 773dfa8..9774a91 100644 --- a/contrib/sendmail/src/milter.c +++ b/contrib/sendmail/src/milter.c @@ -10,7 +10,7 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: milter.c,v 8.277 2009/11/06 00:57:06 ca Exp $") +SM_RCSID("@(#)$Id: milter.c,v 8.279 2012/11/16 20:25:03 ca Exp $") #if MILTER # include <sm/sendmail.h> @@ -42,7 +42,7 @@ static char *milter_write __P((struct milter *, int, char *, ssize_t, time_t, ENVELOPE *, const char *)); static char *milter_send_command __P((struct milter *, int, void *, ssize_t, ENVELOPE *, char *, const char *)); -static char *milter_command __P((int, void *, ssize_t, char **, +static char *milter_command __P((int, void *, ssize_t, int, ENVELOPE *, char *, const char *, bool)); static char *milter_body __P((struct milter *, ENVELOPE *, char *)); static int milter_reopen_df __P((ENVELOPE *)); @@ -79,13 +79,13 @@ static int milter_set_macros __P((char *, char **, char *, int)); # define SMFS_READY 'R' /* ready for action */ # define SMFS_SKIP 'S' /* skip body */ -static char *MilterConnectMacros[MAXFILTERMACROS + 1]; -static char *MilterHeloMacros[MAXFILTERMACROS + 1]; -static char *MilterEnvFromMacros[MAXFILTERMACROS + 1]; -static char *MilterEnvRcptMacros[MAXFILTERMACROS + 1]; -static char *MilterDataMacros[MAXFILTERMACROS + 1]; -static char *MilterEOMMacros[MAXFILTERMACROS + 1]; -static char *MilterEOHMacros[MAXFILTERMACROS + 1]; +/* +** MilterMacros contains the milter macros for each milter and each stage. +** indices are (in order): stages, milter-index, macro +** milter-index == 0: "global" macros (not for a specific milter). +*/ + +static char *MilterMacros[SMFIM_LAST + 1][MAXFILTERS + 1][MAXFILTERMACROS + 1]; static size_t MilterMaxDataSize = MILTER_MAX_DATA_SIZE; # define MILTER_CHECK_DONE_MSG() \ @@ -98,6 +98,16 @@ static size_t MilterMaxDataSize = MILTER_MAX_DATA_SIZE; milter_abort(e); \ } +/* set state in case of an error */ +# define MILTER_SET_STATE \ + if (bitnset(SMF_TEMPFAIL, m->mf_flags)) \ + *state = SMFIR_TEMPFAIL; \ + else if (bitnset(SMF_TEMPDROP, m->mf_flags)) \ + *state = SMFIR_SHUTDOWN; \ + else if (bitnset(SMF_REJECT, m->mf_flags)) \ + *state = SMFIR_REJECT + +/* flow through code maybe using continue; don't wrap in do {} while */ # define MILTER_CHECK_ERROR(initial, action) \ if (!initial && tTd(71, 100)) \ { \ @@ -119,12 +129,7 @@ static size_t MilterMaxDataSize = MILTER_MAX_DATA_SIZE; e->e_quarmsg); \ } \ } \ - else if (bitnset(SMF_TEMPFAIL, m->mf_flags)) \ - *state = SMFIR_TEMPFAIL; \ - else if (bitnset(SMF_TEMPDROP, m->mf_flags)) \ - *state = SMFIR_SHUTDOWN; \ - else if (bitnset(SMF_REJECT, m->mf_flags)) \ - *state = SMFIR_REJECT; \ + else MILTER_SET_STATE; \ else \ action; @@ -1221,6 +1226,7 @@ milter_setup(line) char *p; struct milter *m; STAB *s; + static int idx = 0; /* collect the filter name */ for (p = line; @@ -1323,7 +1329,10 @@ milter_setup(line) if (s->s_milter != NULL) syserr("X%s: duplicate filter definition", m->mf_name); else + { s->s_milter = m; + m->mf_idx = ++idx; + } } /* @@ -1555,20 +1564,13 @@ static struct milteropt unsigned char mo_code; /* code for option */ } MilterOptTab[] = { -# define MO_MACROS_CONNECT SMFIM_CONNECT - { "macros.connect", MO_MACROS_CONNECT }, -# define MO_MACROS_HELO SMFIM_HELO - { "macros.helo", MO_MACROS_HELO }, -# define MO_MACROS_ENVFROM SMFIM_ENVFROM - { "macros.envfrom", MO_MACROS_ENVFROM }, -# define MO_MACROS_ENVRCPT SMFIM_ENVRCPT - { "macros.envrcpt", MO_MACROS_ENVRCPT }, -# define MO_MACROS_DATA SMFIM_DATA - { "macros.data", MO_MACROS_DATA }, -# define MO_MACROS_EOM SMFIM_EOM - { "macros.eom", MO_MACROS_EOM }, -# define MO_MACROS_EOH SMFIM_EOH - { "macros.eoh", MO_MACROS_EOH }, + { "macros.connect", SMFIM_CONNECT }, + { "macros.helo", SMFIM_HELO }, + { "macros.envfrom", SMFIM_ENVFROM }, + { "macros.envrcpt", SMFIM_ENVRCPT }, + { "macros.data", SMFIM_DATA }, + { "macros.eom", SMFIM_EOM }, + { "macros.eoh", SMFIM_EOH }, # define MO_LOGLEVEL 0x07 { "loglevel", MO_LOGLEVEL }, @@ -1655,39 +1657,14 @@ milter_set_option(name, val, sticky) break; # endif /* _FFR_MAXDATASIZE || _FFR_MDS_NEGOTIATE */ - case MO_MACROS_CONNECT: - if (macros == NULL) - macros = MilterConnectMacros; - /* FALLTHROUGH */ - - case MO_MACROS_HELO: - if (macros == NULL) - macros = MilterHeloMacros; - /* FALLTHROUGH */ - - case MO_MACROS_ENVFROM: - if (macros == NULL) - macros = MilterEnvFromMacros; - /* FALLTHROUGH */ - - case MO_MACROS_ENVRCPT: - if (macros == NULL) - macros = MilterEnvRcptMacros; - /* FALLTHROUGH */ - - case MO_MACROS_EOH: - if (macros == NULL) - macros = MilterEOHMacros; - /* FALLTHROUGH */ - - case MO_MACROS_EOM: - if (macros == NULL) - macros = MilterEOMMacros; - /* FALLTHROUGH */ - - case MO_MACROS_DATA: - if (macros == NULL) - macros = MilterDataMacros; + case SMFIM_CONNECT: + case SMFIM_HELO: + case SMFIM_ENVFROM: + case SMFIM_ENVRCPT: + case SMFIM_EOH: + case SMFIM_EOM: + case SMFIM_DATA: + macros = MilterMacros[mo->mo_code][0]; r = milter_set_macros(name, macros, val, nummac); if (r >= 0) @@ -2188,7 +2165,7 @@ milter_send_command(m, cmd, data, sz, e, state, where) sm_syslog(LOG_ERR, e->e_id, "milter_send_command(%s): action=%s returned bogus response %c", m->mf_name, action, rcmd); - milter_error(m, e); + milter_error(m, e); /* NO ERROR CHECK? */ break; } @@ -2218,11 +2195,11 @@ milter_send_command(m, cmd, data, sz, e, state, where) */ static char * -milter_command(cmd, data, sz, macros, e, state, where, cmd_error) +milter_command(cmd, data, sz, stage, e, state, where, cmd_error) int cmd; void *data; ssize_t sz; - char **macros; + int stage; ENVELOPE *e; char *state; const char *where; @@ -2254,14 +2231,27 @@ milter_command(cmd, data, sz, macros, e, state, where, cmd_error) (m->mf_state != SMFS_OPEN && m->mf_state != SMFS_INMSG)) continue; - /* send macros (regardless of whether we send command) */ - if (macros != NULL && macros[0] != NULL) + if (stage >= SMFIM_FIRST && stage <= SMFIM_LAST) { - milter_send_macros(m, macros, command, e); - if (m->mf_state == SMFS_ERROR) + int idx; + char **macros; + + if ((m->mf_lflags & MI_LFLAGS_SYM(stage)) != 0) + idx = m->mf_idx; + else + idx = 0; + SM_ASSERT(idx >= 0 && idx <= MAXFILTERS); + macros = MilterMacros[stage][idx]; + + /* send macros (regardless of whether we send cmd) */ + if (macros != NULL && macros[0] != NULL) { - MILTER_CHECK_ERROR(false, continue); - break; + milter_send_macros(m, macros, command, e); + if (m->mf_state == SMFS_ERROR) + { + MILTER_CHECK_ERROR(false, continue); + break; + } } } @@ -2329,40 +2319,17 @@ milter_getsymlist(m, buf, rlen, offset) switch (i) { - case MO_MACROS_CONNECT: - if (macros == NULL) - macros = MilterConnectMacros; - /* FALLTHROUGH */ - - case MO_MACROS_HELO: - if (macros == NULL) - macros = MilterHeloMacros; - /* FALLTHROUGH */ - - case MO_MACROS_ENVFROM: - if (macros == NULL) - macros = MilterEnvFromMacros; - /* FALLTHROUGH */ - - case MO_MACROS_ENVRCPT: - if (macros == NULL) - macros = MilterEnvRcptMacros; - /* FALLTHROUGH */ - - case MO_MACROS_EOM: - if (macros == NULL) - macros = MilterEOMMacros; - /* FALLTHROUGH */ - - case MO_MACROS_EOH: - if (macros == NULL) - macros = MilterEOHMacros; - /* FALLTHROUGH */ - - case MO_MACROS_DATA: - if (macros == NULL) - macros = MilterDataMacros; - + case SMFIM_CONNECT: + case SMFIM_HELO: + case SMFIM_ENVFROM: + case SMFIM_ENVRCPT: + case SMFIM_EOH: + case SMFIM_EOM: + case SMFIM_DATA: + SM_ASSERT(m->mf_idx > 0 && m->mf_idx < MAXFILTERS); + macros = MilterMacros[i][m->mf_idx]; + + m->mf_lflags |= MI_LFLAGS_SYM(i); len = strlen(buf + offset); if (len > 0) { @@ -2370,6 +2337,9 @@ milter_getsymlist(m, buf, rlen, offset) buf + offset, nummac); if (r >= 0) nummac = r; + if (tTd(64, 5)) + sm_dprintf("milter_getsymlist(%s, %s)=%d\n", + m->mf_name, buf + offset, r); } break; @@ -3989,7 +3959,7 @@ milter_connect(hostname, addr, e, state) (void) memcpy(bp, sockinfo, strlen(sockinfo) + 1); } - response = milter_command(SMFIC_CONNECT, buf, s, MilterConnectMacros, + response = milter_command(SMFIC_CONNECT, buf, s, SMFIM_CONNECT, e, state, "connect", false); sm_free(buf); /* XXX */ @@ -4078,7 +4048,7 @@ milter_helo(helo, e, state) } response = milter_command(SMFIC_HELO, helo, strlen(helo) + 1, - MilterHeloMacros, e, state, "helo", false); + SMFIM_EOH, e, state, "helo", false); milter_per_connection_check(e); return response; } @@ -4166,7 +4136,7 @@ milter_envfrom(args, e, state) sm_syslog(LOG_INFO, e->e_id, "Milter: sender: %s", buf); /* send it over */ - response = milter_command(SMFIC_MAIL, buf, s, MilterEnvFromMacros, + response = milter_command(SMFIC_MAIL, buf, s, SMFIM_ENVFROM, e, state, "mail", false); sm_free(buf); /* XXX */ @@ -4247,7 +4217,7 @@ milter_envrcpt(args, e, state, rcpt_error) sm_syslog(LOG_INFO, e->e_id, "Milter: rcpts: %s", buf); /* send it over */ - response = milter_command(SMFIC_RCPT, buf, s, MilterEnvRcptMacros, + response = milter_command(SMFIC_RCPT, buf, s, SMFIM_ENVRCPT, e, state, "rcpt", rcpt_error); sm_free(buf); /* XXX */ return response; @@ -4273,8 +4243,8 @@ milter_data_cmd(e, state) sm_dprintf("milter_data_cmd\n"); /* send it over */ - return milter_command(SMFIC_DATA, NULL, 0, MilterDataMacros, e, state, - "data", false); + return milter_command(SMFIC_DATA, NULL, 0, SMFIM_DATA, + e, state, "data", false); } /* @@ -4293,7 +4263,12 @@ milter_data_cmd(e, state) ** modify the envelope or message. */ +/* flow through code using continue; don't wrap in do {} while */ # define MILTER_CHECK_RESULTS() \ + if (m->mf_state == SMFS_ERROR && *state == SMFIR_CONTINUE) \ + { \ + MILTER_SET_STATE; \ + } \ if (*state == SMFIR_ACCEPT || \ m->mf_state == SMFS_DONE || \ m->mf_state == SMFS_ERROR) \ @@ -4339,6 +4314,8 @@ milter_data(e, state) for (i = 0; InputFilters[i] != NULL; i++) { + int idx; + char **macros; struct milter *m = InputFilters[i]; if (*state != SMFIR_CONTINUE && @@ -4383,10 +4360,16 @@ milter_data(e, state) if (tTd(64, 10)) sm_dprintf("milter_data: eoh\n"); - if (MilterEOHMacros[0] != NULL) + if ((m->mf_lflags & MI_LFLAGS_SYM(SMFIM_EOH)) != 0) + idx = m->mf_idx; + else + idx = 0; + SM_ASSERT(idx >= 0 && idx <= MAXFILTERS); + macros = MilterMacros[SMFIM_EOH][idx]; + + if (macros != NULL) { - milter_send_macros(m, MilterEOHMacros, - SMFIC_EOH, e); + milter_send_macros(m, macros, SMFIC_EOH, e); MILTER_CHECK_RESULTS(); } @@ -4405,10 +4388,15 @@ milter_data(e, state) MILTER_CHECK_RESULTS(); } - if (MilterEOMMacros[0] != NULL) + if ((m->mf_lflags & MI_LFLAGS_SYM(SMFIM_EOH)) != 0) + idx = m->mf_idx; + else + idx = 0; + SM_ASSERT(idx >= 0 && idx <= MAXFILTERS); + macros = MilterMacros[SMFIM_EOM][idx]; + if (macros != NULL) { - milter_send_macros(m, MilterEOMMacros, - SMFIC_BODYEOB, e); + milter_send_macros(m, macros, SMFIC_BODYEOB, e); MILTER_CHECK_RESULTS(); } @@ -4734,7 +4722,7 @@ milter_unknown(smtpcmd, e, state) sm_dprintf("milter_unknown(%s)\n", smtpcmd); return milter_command(SMFIC_UNKNOWN, smtpcmd, strlen(smtpcmd) + 1, - NULL, e, state, "unknown", false); + SMFIM_NOMACROS, e, state, "unknown", false); } /* diff --git a/contrib/sendmail/src/parseaddr.c b/contrib/sendmail/src/parseaddr.c index 9135c22..930f61d 100644 --- a/contrib/sendmail/src/parseaddr.c +++ b/contrib/sendmail/src/parseaddr.c @@ -13,7 +13,7 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: parseaddr.c,v 8.404 2010/07/27 03:35:42 ca Exp $") +SM_RCSID("@(#)$Id: parseaddr.c,v 8.405 2012/02/27 22:49:08 ca Exp $") #include <sm/sendmail.h> #include "map.h" @@ -242,6 +242,7 @@ parseaddr(addr, a, flags, delim, delimptr, e, isrcpt) ** ** Parameters: ** addr -- the address to check. +** note: this is the complete address (including display part) ** delimptr -- if non-NULL: end of address to check, i.e., ** a pointer in the address string. ** isrcpt -- true iff the address is for a recipient. diff --git a/contrib/sendmail/src/queue.c b/contrib/sendmail/src/queue.c index 16142d9..70b2965 100644 --- a/contrib/sendmail/src/queue.c +++ b/contrib/sendmail/src/queue.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2009, 2011 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2009, 2011, 2012 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -14,7 +14,7 @@ #include <sendmail.h> #include <sm/sem.h> -SM_RCSID("@(#)$Id: queue.c,v 8.991 2011/03/15 23:14:36 ca Exp $") +SM_RCSID("@(#)$Id: queue.c,v 8.997 2012/06/14 23:54:03 ca Exp $") #include <dirent.h> @@ -1493,6 +1493,7 @@ runqueue(forkflag, verbose, persistent, runall) for (i = 0; i < NumWorkGroups && !NoMoreRunners; i++) { int rwgflags = RWG_NONE; + int wasblocked; /* ** If MaxQueueChildren active then test whether the start @@ -1529,7 +1530,11 @@ runqueue(forkflag, verbose, persistent, runall) ** increase if some queue runners "hang" for a long time. */ + /* don't let proc_list_drop() change CurRunners */ + wasblocked = sm_blocksignal(SIGCHLD); CurRunners += WorkGrp[curnum].wg_maxact; + if (wasblocked == 0) + (void) sm_releasesignal(SIGCHLD); if (forkflag) rwgflags |= RWG_FORK; if (verbose) @@ -1549,7 +1554,13 @@ runqueue(forkflag, verbose, persistent, runall) if (!ret) { + /* don't let proc_list_drop() change CurRunners */ + wasblocked = sm_blocksignal(SIGCHLD); CurRunners -= WorkGrp[curnum].wg_maxact; + CHK_CUR_RUNNERS("runqueue", curnum, + WorkGrp[curnum].wg_maxact); + if (wasblocked == 0) + (void) sm_releasesignal(SIGCHLD); break; } @@ -2031,6 +2042,9 @@ run_work_group(wgrp, flags) { IgnoreHostStatus = true; MinQueueAge = 0; +#if _FFR_EXPDELAY + MaxQueueAge = 0; +#endif /* _FFR_EXPDELAY */ } /* @@ -2300,7 +2314,7 @@ run_work_group(wgrp, flags) if (bitset(RWG_PERSISTENT, flags)) { sequenceno = 1; - sm_setproctitle(true, CurEnv, "running queue: %s", + sm_setproctitle(true, NULL, "running queue: %s", qid_printqueue(qgrp, qdir)); /* @@ -2860,7 +2874,7 @@ gatherq(qgrp, qdir, doall, full, more, pnentries) #if _FFR_EXPDELAY if (MaxQueueAge > 0) { - time_t lasttry, delay; + time_t lasttry, delay; lasttry = (time_t) atol(&lbuf[1]); delay = MIN(lasttry - w->w_ctime, @@ -3704,6 +3718,7 @@ dowork(qgrp, qdir, id, forkflag, requeueflag, e) (void) dropenvelope(e, true, false); sm_rpool_free(rpool); e->e_rpool = NULL; + e->e_message = NULL; } } e->e_id = NULL; @@ -4577,7 +4592,7 @@ readqf(e, openonly) e->e_dfdev = st.st_dev; e->e_dfino = ST_INODE(st); (void) sm_snprintf(buf, sizeof(buf), "%ld", - e->e_msgsize); + PRT_NONNEGL(e->e_msgsize)); macdefine(&e->e_macro, A_TEMP, macid("{msg_size}"), buf); } diff --git a/contrib/sendmail/src/sasl.c b/contrib/sendmail/src/sasl.c index c3f561d..0e4e8e1 100644 --- a/contrib/sendmail/src/sasl.c +++ b/contrib/sendmail/src/sasl.c @@ -9,7 +9,7 @@ */ #include <sm/gen.h> -SM_RCSID("@(#)$Id: sasl.c,v 8.22 2006/08/15 23:24:57 ca Exp $") +SM_RCSID("@(#)$Id: sasl.c,v 8.23 2012/11/27 18:53:13 gshapiro Exp $") #if SASL # include <stdlib.h> @@ -20,15 +20,15 @@ SM_RCSID("@(#)$Id: sasl.c,v 8.22 2006/08/15 23:24:57 ca Exp $") ** In order to ensure that storage leaks are tracked, and to prevent ** conflicts between the sm_heap package and sasl, we tell sasl to ** use the following heap allocation functions. Unfortunately, -** the sasl package incorrectly specifies the size of a block +** older sasl packages incorrectly specifies the size of a block ** using unsigned long: for portability, it should be size_t. */ -#if defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a -#define SM_SASL_SIZE_T size_t -#else /* defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a */ -#define SM_SASL_SIZE_T unsigned long -#endif /* defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a */ +# if defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a +# define SM_SASL_SIZE_T size_t +# else /* defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a */ +# define SM_SASL_SIZE_T unsigned long +# endif /* defined(SASL_VERSION_FULL) && SASL_VERSION_FULL >= 0x02011a */ void *sm_sasl_malloc __P((SM_SASL_SIZE_T)); static void *sm_sasl_calloc __P((SM_SASL_SIZE_T, SM_SASL_SIZE_T)); diff --git a/contrib/sendmail/src/savemail.c b/contrib/sendmail/src/savemail.c index 4178245..2413281 100644 --- a/contrib/sendmail/src/savemail.c +++ b/contrib/sendmail/src/savemail.c @@ -13,7 +13,7 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: savemail.c,v 8.314 2009/12/18 17:08:01 ca Exp $") +SM_RCSID("@(#)$Id: savemail.c,v 8.315 2012/02/27 17:43:03 gshapiro Exp $") static bool errbody __P((MCI *, ENVELOPE *, char *)); static bool pruneroute __P((char *)); @@ -506,6 +506,7 @@ returntosender(msg, returnq, flags, e) int flags; register ENVELOPE *e; { + int ret; register ENVELOPE *ee; ENVELOPE *oldcur = CurEnv; ENVELOPE errenvelope; @@ -703,24 +704,35 @@ returntosender(msg, returnq, flags, e) /* actually deliver the error message */ sendall(ee, SM_DELIVER); - - /* restore state */ (void) dropenvelope(ee, true, false); - sm_rpool_free(ee->e_rpool); - CurEnv = oldcur; - returndepth--; /* check for delivery errors */ + ret = -1; if (ee->e_parent == NULL || !bitset(EF_RESPONSE, ee->e_parent->e_flags)) - return 0; - for (q = ee->e_sendqueue; q != NULL; q = q->q_next) { - if (QS_IS_ATTEMPTED(q->q_state)) - return 0; + ret = 0; } - return -1; + else + { + for (q = ee->e_sendqueue; q != NULL; q = q->q_next) + { + if (QS_IS_ATTEMPTED(q->q_state)) + { + ret = 0; + break; + } + } + } + + /* restore state */ + sm_rpool_free(ee->e_rpool); + CurEnv = oldcur; + returndepth--; + + return ret; } + /* ** ERRBODY -- output the body of an error message. ** diff --git a/contrib/sendmail/src/sendmail.h b/contrib/sendmail/src/sendmail.h index ecb3fa3..e114019 100644 --- a/contrib/sendmail/src/sendmail.h +++ b/contrib/sendmail/src/sendmail.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2011 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2012 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -52,7 +52,7 @@ #ifdef _DEFINE # ifndef lint -SM_UNUSED(static char SmailId[]) = "@(#)$Id: sendmail.h,v 8.1089 2011/03/15 23:14:36 ca Exp $"; +SM_UNUSED(static char SmailId[]) = "@(#)$Id: sendmail.h,v 8.1096 2012/11/16 20:25:03 ca Exp $"; # endif /* ! lint */ #endif /* _DEFINE */ @@ -946,6 +946,8 @@ struct envelope #endif /* _FFR_MILTER_ENHSC */ }; +#define PRT_NONNEGL(v) ((v) < 0 ? LONG_MAX : (v)) + /* values for e_flags */ #define EF_OLDSTYLE 0x00000001L /* use spaces (not commas) in hdrs */ #define EF_INQUEUE 0x00000002L /* this message is fully queued */ @@ -1486,7 +1488,6 @@ struct symtab union { BITMAP256 sv_class; /* bit-map of word classes */ - ADDRESS *sv_addr; /* pointer to address header */ MAILER *sv_mailer; /* pointer to mailer */ char *sv_alias; /* alias */ MAPCLASS sv_mapclass; /* mapping function class */ @@ -1516,7 +1517,7 @@ typedef struct symtab STAB; /* symbol types */ #define ST_UNDEF 0 /* undefined type */ #define ST_CLASS 1 /* class map */ -#define ST_ADDRESS 2 /* an address in parsed format */ +/* #define ST_unused 2 UNUSED */ #define ST_MAILER 3 /* a mailer header */ #define ST_ALIAS 4 /* an alias */ #define ST_MAPCLASS 5 /* mapping function class */ @@ -1543,7 +1544,6 @@ typedef struct symtab STAB; #define ST_MCI 17 /* mailer connection info (offset) */ #define s_class s_value.sv_class -#define s_address s_value.sv_addr #define s_mailer s_value.sv_mailer #define s_alias s_value.sv_alias #define s_mci s_value.sv_mci @@ -1785,6 +1785,8 @@ struct milter char *mf_conn; /* connection info */ int mf_sock; /* connected socket */ char mf_state; /* state of filter */ + char mf_lflags; /* "local" flags */ + int mf_idx; /* milter number (index) */ time_t mf_timeout[SMFTO_NUM_TO]; /* timeouts */ #if _FFR_MILTER_CHECK /* for testing only */ @@ -1794,6 +1796,9 @@ struct milter #endif /* _FFR_MILTER_CHECK */ }; +#define MI_LFL_NONE 0x00000000 +#define MI_LFLAGS_SYM(st) (1 << (st)) /* has its own symlist for stage st */ + struct milters { mi_int32 mis_flags; /* filter flags */ @@ -2241,6 +2246,19 @@ extern unsigned char tTdvect[100]; /* trace vector */ # define CHECK_RESTART _CHECK_RESTART +#define CHK_CUR_RUNNERS(fct, idx, count) \ + do \ + { \ + if (CurRunners < 0) \ + { \ + if (LogLevel > 3) \ + sm_syslog(LOG_ERR, NOQID, \ + "%s: CurRunners=%d, i=%d, count=%d, status=should not happen", \ + fct, CurRunners, idx, count); \ + CurRunners = 0; \ + } \ + } while (0) + /* reply types (text in SmtpMsgBuffer) */ #define XS_DEFAULT 0 #define XS_STARTTLS 1 diff --git a/contrib/sendmail/src/srvrsmtp.c b/contrib/sendmail/src/srvrsmtp.c index 1e6a5d2..c4c045b 100644 --- a/contrib/sendmail/src/srvrsmtp.c +++ b/contrib/sendmail/src/srvrsmtp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2010 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2010, 2012 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -17,7 +17,7 @@ # include <libmilter/mfdef.h> #endif /* MILTER */ -SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.1008 2011/01/12 23:52:59 ca Exp $") +SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.1011 2012/12/19 02:49:21 ca Exp $") #include <sm/time.h> #include <sm/fdset.h> @@ -30,6 +30,7 @@ SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.1008 2011/01/12 23:52:59 ca Exp $") static int saslmechs __P((sasl_conn_t *, char **)); #endif /* SASL */ #if STARTTLS +# include <openssl/err.h> # include <sysexits.h> static SSL_CTX *srv_ctx = NULL; /* TLS server context */ @@ -1914,11 +1915,18 @@ smtp(nullserver, d_flags, e) if (LogLevel > 5) { + unsigned long l; + const char *sr; + + l = ERR_peek_error(); + sr = ERR_reason_error_string(l); sm_syslog(LOG_WARNING, NOQID, - "STARTTLS=server, error: accept failed=%d, SSL_error=%d, errno=%d, retry=%d, relay=%.100s", - r, ssl_err, errno, i, + "STARTTLS=server, error: accept failed=%d, reason=%s, SSL_error=%d, errno=%d, retry=%d, relay=%.100s", + r, sr == NULL ? "unknown" + : sr, + ssl_err, errno, i, CurSmtpClient); - if (LogLevel > 8) + if (LogLevel > 9) tlslogerr("server"); } tls_ok_srv = false; @@ -3481,7 +3489,7 @@ smtp_data(smtp, e) collect(InChannel, true, NULL, e, true); /* redefine message size */ - (void) sm_snprintf(buf, sizeof(buf), "%ld", e->e_msgsize); + (void) sm_snprintf(buf, sizeof(buf), "%ld", PRT_NONNEGL(e->e_msgsize)); macdefine(&e->e_macro, A_TEMP, macid("{msg_size}"), buf); /* rscheck() will set Errors or EF_DISCARD if it trips */ @@ -3559,7 +3567,7 @@ smtp_data(smtp, e) } /* Milter may have changed message size */ - (void) sm_snprintf(buf, sizeof(buf), "%ld", e->e_msgsize); + (void) sm_snprintf(buf, sizeof(buf), "%ld", PRT_NONNEGL(e->e_msgsize)); macdefine(&e->e_macro, A_TEMP, macid("{msg_size}"), buf); /* abort message filters that didn't get the body & log msg is OK */ diff --git a/contrib/sendmail/src/stab.c b/contrib/sendmail/src/stab.c index 6dacdfa..1c4c0c1 100644 --- a/contrib/sendmail/src/stab.c +++ b/contrib/sendmail/src/stab.c @@ -13,7 +13,7 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: stab.c,v 8.89 2006/08/15 23:24:58 ca Exp $") +SM_RCSID("@(#)$Id: stab.c,v 8.91 2011/08/08 17:33:34 ca Exp $") /* ** STAB -- manage the symbol table @@ -65,7 +65,7 @@ stab(name, type, op) sm_dprintf("(hfunc=%d) ", hfunc); ps = &SymTab[hfunc]; - if (type == ST_MACRO || type == ST_RULESET) + if (type == ST_MACRO || type == ST_RULESET || type == ST_NAMECANON) { while ((s = *ps) != NULL && (s->s_symtype != type || strcmp(name, s->s_name))) @@ -113,10 +113,6 @@ stab(name, type, op) len = sizeof(s->s_class); break; - case ST_ADDRESS: - len = sizeof(s->s_address); - break; - case ST_MAILER: len = sizeof(s->s_mailer); break; diff --git a/contrib/sendmail/src/util.c b/contrib/sendmail/src/util.c index ab491fb..9bc28ec 100644 --- a/contrib/sendmail/src/util.c +++ b/contrib/sendmail/src/util.c @@ -13,7 +13,7 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: util.c,v 8.416 2009/12/18 17:05:26 ca Exp $") +SM_RCSID("@(#)$Id: util.c,v 8.425 2012/03/03 00:10:43 ca Exp $") #include <sm/sendmail.h> #include <sysexits.h> @@ -2638,7 +2638,13 @@ proc_list_drop(pid, st, other) mark_work_group_restart(ProcListVec[i].proc_other, st); } else if (type == PROC_QUEUE) + { CurRunners -= ProcListVec[i].proc_count; + + /* CHK_CUR_RUNNERS() can't be used here: uses syslog() */ + if (CurRunners < 0) + CurRunners = 0; + } } /* @@ -2702,6 +2708,14 @@ proc_list_probe() (int) ProcListVec[i].proc_pid); ProcListVec[i].proc_pid = NO_PID; SM_FREE_CLR(ProcListVec[i].proc_task); + + if (ProcListVec[i].proc_type == PROC_QUEUE) + { + CurRunners -= ProcListVec[i].proc_count; + CHK_CUR_RUNNERS("proc_list_probe", i, + ProcListVec[i].proc_count); + } + CurChildren--; } else @@ -2852,3 +2866,4 @@ count_open_connections(hostaddr) } return n; } + diff --git a/contrib/sendmail/src/version.c b/contrib/sendmail/src/version.c index 4f156c2..2e9fe48 100644 --- a/contrib/sendmail/src/version.c +++ b/contrib/sendmail/src/version.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2011 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2012 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -13,6 +13,6 @@ #include <sm/gen.h> -SM_RCSID("@(#)$Id: version.c,v 8.227 2011/04/26 23:02:35 ca Exp $") +SM_RCSID("@(#)$Id: version.c,v 8.235 2012/12/19 05:11:44 ca Exp $") -char Version[] = "8.14.5"; +char Version[] = "8.14.6"; |