diff options
author | gshapiro <gshapiro@FreeBSD.org> | 2003-03-29 19:12:53 +0000 |
---|---|---|
committer | gshapiro <gshapiro@FreeBSD.org> | 2003-03-29 19:12:53 +0000 |
commit | 1d6cd0b52a5c50459b966f2272a115d5bd4b535f (patch) | |
tree | f5dfc93fac7c6539cc0234a51793f6fbae8dc06b /contrib/sendmail/src | |
parent | 9341362461d42776920ab0040995f929409ef9e6 (diff) | |
parent | 3c5a1e863a66866807948f160122c79d2dd388f5 (diff) | |
download | FreeBSD-src-1d6cd0b52a5c50459b966f2272a115d5bd4b535f.zip FreeBSD-src-1d6cd0b52a5c50459b966f2272a115d5bd4b535f.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r112810,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/sendmail/src')
-rw-r--r-- | contrib/sendmail/src/README | 7 | ||||
-rw-r--r-- | contrib/sendmail/src/collect.c | 7 | ||||
-rw-r--r-- | contrib/sendmail/src/deliver.c | 17 | ||||
-rw-r--r-- | contrib/sendmail/src/main.c | 11 | ||||
-rw-r--r-- | contrib/sendmail/src/milter.c | 38 | ||||
-rw-r--r-- | contrib/sendmail/src/parseaddr.c | 17 | ||||
-rw-r--r-- | contrib/sendmail/src/queue.c | 12 | ||||
-rw-r--r-- | contrib/sendmail/src/readcf.c | 28 | ||||
-rw-r--r-- | contrib/sendmail/src/sendmail.h | 5 | ||||
-rw-r--r-- | contrib/sendmail/src/sm_resolve.c | 21 | ||||
-rw-r--r-- | contrib/sendmail/src/srvrsmtp.c | 4 | ||||
-rw-r--r-- | contrib/sendmail/src/tls.c | 2 | ||||
-rw-r--r-- | contrib/sendmail/src/usersmtp.c | 16 | ||||
-rw-r--r-- | contrib/sendmail/src/version.c | 4 |
14 files changed, 133 insertions, 56 deletions
diff --git a/contrib/sendmail/src/README b/contrib/sendmail/src/README index ba9d126..7686b6c 100644 --- a/contrib/sendmail/src/README +++ b/contrib/sendmail/src/README @@ -9,7 +9,7 @@ # the sendmail distribution. # # -# $Id: README,v 8.355.2.13 2003/01/15 19:17:15 ca Exp $ +# $Id: README,v 8.355.2.14 2003/03/27 21:39:29 ca Exp $ # This directory contains the source files for sendmail(TM). @@ -478,6 +478,9 @@ USE_ENVIRON Set this to 1 to access process environment variables from parameter of main(). USE_DOUBLE_FORK By default this is on (1). Set it to 0 to suppress the extra fork() used to avoid intermediate zombies. +ALLOW_255 Do not convert (char)0xff to (char)0x7f in headers etc. + This can also be done at runtime with the command line + option -d82.101. +-----------------------+ @@ -1794,4 +1797,4 @@ util.c Some general purpose routines used by sendmail. version.c The version number and information about this version of sendmail. -(Version $Revision: 8.355.2.13 $, last update $Date: 2003/01/15 19:17:15 $ ) +(Version $Revision: 8.355.2.14 $, last update $Date: 2003/03/27 21:39:29 $ ) diff --git a/contrib/sendmail/src/collect.c b/contrib/sendmail/src/collect.c index 6ebd049..0e50ca0 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.242.2.3 2002/12/03 17:06:30 gshapiro Exp $") +SM_RCSID("@(#)$Id: collect.c,v 8.242.2.4 2003/03/28 17:34:39 ca Exp $") static void collecttimeout __P((time_t)); static void dferror __P((SM_FILE_T *volatile, char *, ENVELOPE *)); @@ -444,6 +444,7 @@ collect(fp, smtpmode, hdrp, e) OpMode != MD_ARPAFTP)) { + SM_ASSERT(pbp < peekbuf + sizeof(peekbuf)); *pbp++ = c; c = '.'; } @@ -455,11 +456,14 @@ collect(fp, smtpmode, hdrp, e) else { /* push back the ".\rx" */ + SM_ASSERT(pbp < peekbuf + sizeof(peekbuf)); *pbp++ = c; if (OpMode != MD_SMTP && OpMode != MD_DAEMON && OpMode != MD_ARPAFTP) { + SM_ASSERT(pbp < peekbuf + + sizeof(peekbuf)); *pbp++ = '\r'; c = '.'; } @@ -625,6 +629,7 @@ nextstate: } /* trim off trailing CRLF or NL */ + SM_ASSERT(bp > buf); if (*--bp != '\n' || *--bp != '\r') bp++; *bp = '\0'; diff --git a/contrib/sendmail/src/deliver.c b/contrib/sendmail/src/deliver.c index 2cb6e3f..af6e41f 100644 --- a/contrib/sendmail/src/deliver.c +++ b/contrib/sendmail/src/deliver.c @@ -14,7 +14,7 @@ #include <sendmail.h> #include <sys/time.h> -SM_RCSID("@(#)$Id: deliver.c,v 8.940.2.15 2003/02/07 17:57:43 ca Exp $") +SM_RCSID("@(#)$Id: deliver.c,v 8.940.2.18 2003/03/28 17:34:39 ca Exp $") #if HASSETUSERCONTEXT # include <login_cap.h> @@ -1158,7 +1158,7 @@ coloncmp(a, b) /* Need to account for IPv6 bracketed addresses */ if (*a == '[') braclev++; - else if (*a == '[' && braclev > 0) + else if (*a == ']' && braclev > 0) braclev--; else if (*a == ':' && braclev <= 0) { @@ -1626,7 +1626,7 @@ deliver(e, firstto) } #if _FFR_STRIPBACKSL /* - ** Strip one leading backslash if requesting and the + ** Strip one leading backslash if requested and the ** next character is alphanumerical (the latter can ** probably relaxed a bit, see RFC2821). */ @@ -4719,7 +4719,11 @@ putbody(mci, e, separator) { pos += bp - buf; if (c != '\r') + { + SM_ASSERT(pbp < peekbuf + + sizeof(peekbuf)); *pbp++ = c; + } } bp = buf; @@ -4759,6 +4763,7 @@ putbody(mci, e, separator) } /* had a naked carriage return */ + SM_ASSERT(pbp < peekbuf + sizeof(peekbuf)); *pbp++ = c; c = '\r'; ostate = OS_INLINE; @@ -4787,7 +4792,11 @@ putch: else if ((d = sm_io_getc(e->e_dfp, SM_TIME_DEFAULT)) != SM_IO_EOF) + { + SM_ASSERT(pbp < peekbuf + + sizeof(peekbuf)); *pbp++ = d; + } if (d == '\n' || d == SM_IO_EOF) { @@ -4837,6 +4846,8 @@ putch: mci->mci_mailer->m_eol); } ostate = OS_HEAD; + SM_ASSERT(pbp < peekbuf + + sizeof(peekbuf)); *pbp++ = c; continue; } diff --git a/contrib/sendmail/src/main.c b/contrib/sendmail/src/main.c index e79d923..dbe9ce5 100644 --- a/contrib/sendmail/src/main.c +++ b/contrib/sendmail/src/main.c @@ -25,7 +25,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.887.2.20 2003/02/07 17:57:44 ca Exp $") +SM_RCSID("@(#)$Id: main.c,v 8.887.2.22 2003/03/06 18:38:08 ca Exp $") #if NETINET || NETINET6 @@ -128,6 +128,7 @@ int SyslogPrefixLen; /* estimated length of syslog prefix */ { \ if (extraprivs && \ OpMode != MD_DELIVER && OpMode != MD_SMTP && \ + OpMode != MD_ARPAFTP && \ OpMode != MD_VERIFY && OpMode != MD_TEST) \ { \ (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, \ @@ -392,6 +393,7 @@ main(argc, argv, envp) # endif /* ! OPTIONS */ #endif /* _FFR_QUARANTINE */ + /* Set to 0 to allow -b; need to check optarg before using it! */ opterr = 0; while ((j = getopt(argc, argv, OPTIONS)) != -1) { @@ -442,6 +444,13 @@ main(argc, argv, envp) break; case 'L': + if (optarg == NULL) + { + (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, + "option requires an argument -- '%c'", + (char) j); + return EX_USAGE; + } j = SM_MIN(strlen(optarg), 24) + 1; sysloglabel = xalloc(j); (void) sm_strlcpy(sysloglabel, optarg, j); diff --git a/contrib/sendmail/src/milter.c b/contrib/sendmail/src/milter.c index 305c304..077578b 100644 --- a/contrib/sendmail/src/milter.c +++ b/contrib/sendmail/src/milter.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1999-2003 Sendmail, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set @@ -10,7 +10,7 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: milter.c,v 8.197.2.6 2002/12/30 05:54:00 ca Exp $") +SM_RCSID("@(#)$Id: milter.c,v 8.197.2.7 2003/03/22 18:54:25 ca Exp $") #if MILTER # include <libmilter/mfapi.h> @@ -46,8 +46,18 @@ static char *MilterEnvRcptMacros[MAXFILTERMACROS + 1]; } # if _FFR_QUARANTINE -# define MILTER_CHECK_ERROR(action) \ - if (tTd(71, 101)) \ +# define MILTER_CHECK_ERROR(initial, action) \ + if (!initial && tTd(71, 100)) \ + { \ + if (e->e_quarmsg == NULL) \ + { \ + e->e_quarmsg = sm_rpool_strdup_x(e->e_rpool, \ + "filter failure"); \ + macdefine(&e->e_macro, A_PERM, macid("{quarantine}"), \ + e->e_quarmsg); \ + } \ + } \ + else if (tTd(71, 101)) \ { \ if (e->e_quarmsg == NULL) \ { \ @@ -64,7 +74,7 @@ static char *MilterEnvRcptMacros[MAXFILTERMACROS + 1]; else \ action; # else /* _FFR_QUARANTINE */ -# define MILTER_CHECK_ERROR(action) \ +# define MILTER_CHECK_ERROR(initial, action) \ if (bitnset(SMF_TEMPFAIL, m->mf_flags)) \ *state = SMFIR_TEMPFAIL; \ else if (bitnset(SMF_REJECT, m->mf_flags)) \ @@ -1915,7 +1925,7 @@ milter_send_command(m, command, data, sz, e, state) m->mf_timeout[SMFTO_WRITE], e); if (m->mf_state == SMFS_ERROR) { - MILTER_CHECK_ERROR(return NULL); + MILTER_CHECK_ERROR(false, return NULL); return NULL; } @@ -1924,7 +1934,7 @@ milter_send_command(m, command, data, sz, e, state) m->mf_timeout[SMFTO_READ], e); if (m->mf_state == SMFS_ERROR) { - MILTER_CHECK_ERROR(return NULL); + MILTER_CHECK_ERROR(false, return NULL); return NULL; } @@ -2043,7 +2053,7 @@ milter_command(command, data, sz, macros, e, state) /* previous problem? */ if (m->mf_state == SMFS_ERROR) { - MILTER_CHECK_ERROR(continue); + MILTER_CHECK_ERROR(false, continue); break; } @@ -2058,7 +2068,7 @@ milter_command(command, data, sz, macros, e, state) milter_send_macros(m, macros, command, e); if (m->mf_state == SMFS_ERROR) { - MILTER_CHECK_ERROR(continue); + MILTER_CHECK_ERROR(false, continue); break; } } @@ -3062,7 +3072,7 @@ milter_init(e, state) m->mf_sock = milter_open(m, false, e); if (m->mf_state == SMFS_ERROR) { - MILTER_CHECK_ERROR(continue); + MILTER_CHECK_ERROR(true, continue); break; } @@ -3084,7 +3094,7 @@ milter_init(e, state) /* if negotation failure, close socket */ milter_error(m, e); - MILTER_CHECK_ERROR(continue); + MILTER_CHECK_ERROR(true, continue); } if (MilterLogLevel > 9) sm_syslog(LOG_INFO, e->e_id, @@ -3541,7 +3551,7 @@ milter_data(e, state) /* previous problem? */ if (m->mf_state == SMFS_ERROR) { - MILTER_CHECK_ERROR(continue); + MILTER_CHECK_ERROR(false, continue); break; } @@ -3602,7 +3612,7 @@ milter_data(e, state) "milter_data(%s): EOM ACK/NAK timeout", m->mf_name); milter_error(m, e); - MILTER_CHECK_ERROR(break); + MILTER_CHECK_ERROR(false, break); break; } @@ -3790,7 +3800,7 @@ milter_data(e, state) if (m->mf_state == SMFS_ERROR) { - MILTER_CHECK_ERROR(continue); + MILTER_CHECK_ERROR(false, continue); goto finishup; } } diff --git a/contrib/sendmail/src/parseaddr.c b/contrib/sendmail/src/parseaddr.c index 296d01c..6acc86d 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.359.2.4 2003/01/18 00:41:48 gshapiro Exp $") +SM_RCSID("@(#)$Id: parseaddr.c,v 8.359.2.6 2003/03/27 02:39:53 ca Exp $") static void allocaddr __P((ADDRESS *, int, char *, ENVELOPE *)); static int callsubr __P((char**, int, ENVELOPE *)); @@ -608,7 +608,7 @@ unsigned char TokTypeNoC[256] = }; -#define NOCHAR -1 /* signal nothing in lookahead token */ +#define NOCHAR (-1) /* signal nothing in lookahead token */ char ** prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab) @@ -694,6 +694,7 @@ prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab) /* see if there is room */ if (q >= &pvpbuf[pvpbsize - 5]) { + addrtoolong: usrerr("553 5.1.1 Address too long"); if (strlen(addr) > MAXNAME) addr[MAXNAME] = '\0'; @@ -705,11 +706,15 @@ prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab) } /* squirrel it away */ +#if !ALLOW_255 + if ((char) c == (char) -1 && !tTd(82, 101)) + c &= 0x7f; +#endif /* !ALLOW_255 */ *q++ = c; } /* read a new input character */ - c = *p++; + c = (*p++) & 0x00ff; if (c == '\0') { /* diagnose and patch up bad syntax */ @@ -764,6 +769,9 @@ prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab) } else if (c != '!' || state == QST) { + /* see if there is room */ + if (q >= &pvpbuf[pvpbsize - 5]) + goto addrtoolong; *q++ = '\\'; continue; } @@ -849,6 +857,9 @@ prescan(addr, delim, pvpbuf, pvpbsize, delimptr, toktab) /* new token */ if (tok != q) { + /* see if there is room */ + if (q >= &pvpbuf[pvpbsize - 5]) + goto addrtoolong; *q++ = '\0'; if (tTd(22, 36)) { diff --git a/contrib/sendmail/src/queue.c b/contrib/sendmail/src/queue.c index 0d618ed..b488b5f 100644 --- a/contrib/sendmail/src/queue.c +++ b/contrib/sendmail/src/queue.c @@ -13,7 +13,7 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: queue.c,v 8.863.2.28 2003/02/11 17:17:22 ca Exp $") +SM_RCSID("@(#)$Id: queue.c,v 8.863.2.30 2003/03/20 00:20:16 ca Exp $") #include <dirent.h> @@ -32,11 +32,11 @@ SM_RCSID("@(#)$Id: queue.c,v 8.863.2.28 2003/02/11 17:17:22 ca Exp $") #if _FFR_QUEUEDELAY # define QF_VERSION 7 /* version number of this queue format */ static time_t queuedelay __P((ENVELOPE *)); -#define queuedelay_qfver_unsupported(qfver) false +# define queuedelay_qfver_unsupported(qfver) false #else /* _FFR_QUEUEDELAY */ # define QF_VERSION 6 /* version number of this queue format */ # define queuedelay(e) MinQueueAge -#define queuedelay_qfver_unsupported(qfver) ((qfver) == 5 || (qfver) == 7) +# define queuedelay_qfver_unsupported(qfver) ((qfver) == 5 || (qfver) == 7) #endif /* _FFR_QUEUEDELAY */ #if _FFR_QUARANTINE static char queue_letter __P((ENVELOPE *, int)); @@ -219,7 +219,7 @@ int *PRSATmpCnt; /* offset for queue_shm */ # define OFF_QUEUE_SHM(p) (((char *) (p)) + SHM_OFF_HEAD + sizeof(FileSys) + sizeof(int) * 2) -#define QSHM_ENTRIES(i) QShm[i].qs_entries +# define QSHM_ENTRIES(i) QShm[i].qs_entries /* basic size of shared memory segment */ # define SM_T_SIZE (SHM_OFF_HEAD + sizeof(FileSys) + sizeof(int) * 2) @@ -3316,8 +3316,8 @@ strrev(fwd) #if _FFR_RHS -#define NASCII 128 -#define NCHAR 256 +# define NASCII 128 +# define NCHAR 256 static unsigned char ShuffledAlphabet[NCHAR]; diff --git a/contrib/sendmail/src/readcf.c b/contrib/sendmail/src/readcf.c index b527265..f3e72ad 100644 --- a/contrib/sendmail/src/readcf.c +++ b/contrib/sendmail/src/readcf.c @@ -13,7 +13,7 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: readcf.c,v 8.607.2.7 2002/11/10 19:13:11 ca Exp $") +SM_RCSID("@(#)$Id: readcf.c,v 8.607.2.8 2003/03/12 22:42:52 gshapiro Exp $") #if NETINET || NETINET6 # include <arpa/inet.h> @@ -3976,6 +3976,12 @@ static struct timeoutinfo { "starttls", TO_STARTTLS }, #define TO_ACONNECT 0x23 { "aconnect", TO_ACONNECT }, +#if _FFR_QUEUERETURN_DSN +# define TO_QUEUEWARN_DSN 0x24 + { "queuewarn.dsn", TO_QUEUEWARN_DSN }, +# define TO_QUEUERETURN_DSN 0x25 + { "queuereturn.dsn", TO_QUEUERETURN_DSN }, +#endif /* _FFR_QUEUERETURN_DSN */ { NULL, 0 }, }; @@ -4094,6 +4100,9 @@ settimeout(name, val, sticky) TimeOuts.to_q_warning[TOC_NORMAL] = toval; TimeOuts.to_q_warning[TOC_URGENT] = toval; TimeOuts.to_q_warning[TOC_NONURGENT] = toval; +#if _FFR_QUEUERETURN_DSN + TimeOuts.to_q_warning[TOC_DSN] = toval; +#endif /* _FFR_QUEUERETURN_DSN */ addopts = 2; break; @@ -4112,11 +4121,21 @@ settimeout(name, val, sticky) TimeOuts.to_q_warning[TOC_NONURGENT] = toval; break; +#if _FFR_QUEUERETURN_DSN + case TO_QUEUEWARN_DSN: + toval = convtime(val, 'h'); + TimeOuts.to_q_warning[TOC_DSN] = toval; + break; +#endif /* _FFR_QUEUERETURN_DSN */ + case TO_QUEUERETURN: toval = convtime(val, 'd'); TimeOuts.to_q_return[TOC_NORMAL] = toval; TimeOuts.to_q_return[TOC_URGENT] = toval; TimeOuts.to_q_return[TOC_NONURGENT] = toval; +#if _FFR_QUEUERETURN_DSN + TimeOuts.to_q_return[TOC_DSN] = toval; +#endif /* _FFR_QUEUERETURN_DSN */ addopts = 2; break; @@ -4135,6 +4154,13 @@ settimeout(name, val, sticky) TimeOuts.to_q_return[TOC_NONURGENT] = toval; break; +#if _FFR_QUEUERETURN_DSN + case TO_QUEUERETURN_DSN: + toval = convtime(val, 'd'); + TimeOuts.to_q_return[TOC_DSN] = toval; + break; +#endif /* _FFR_QUEUERETURN_DSN */ + case TO_HOSTSTATUS: MciInfoTimeout = toval; break; diff --git a/contrib/sendmail/src/sendmail.h b/contrib/sendmail/src/sendmail.h index 2bfad15..1092398 100644 --- a/contrib/sendmail/src/sendmail.h +++ b/contrib/sendmail/src/sendmail.h @@ -48,7 +48,7 @@ #ifdef _DEFINE # ifndef lint -SM_UNUSED(static char SmailId[]) = "@(#)$Id: sendmail.h,v 8.919.2.16 2003/01/18 00:41:50 gshapiro Exp $"; +SM_UNUSED(static char SmailId[]) = "@(#)$Id: sendmail.h,v 8.919.2.17 2003/03/12 22:42:52 gshapiro Exp $"; # endif /* ! lint */ #endif /* _DEFINE */ @@ -2021,6 +2021,9 @@ EXTERN struct #define TOC_NORMAL 0 /* normal delivery */ #define TOC_URGENT 1 /* urgent delivery */ #define TOC_NONURGENT 2 /* non-urgent delivery */ +#if _FFR_QUEUERETURN_DSN +# define TOC_DSN 3 /* DSN delivery */ +#endif /* _FFR_QUEUERETURN_DSN */ /* resolver timeout specifiers */ #define RES_TO_FIRST 0 /* first attempt */ diff --git a/contrib/sendmail/src/sm_resolve.c b/contrib/sendmail/src/sm_resolve.c index a6f5862..8828fd1 100644 --- a/contrib/sendmail/src/sm_resolve.c +++ b/contrib/sendmail/src/sm_resolve.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers. * All rights reserved. * * By using this file, you agree to the terms and conditions set @@ -46,7 +46,7 @@ # if NAMED_BIND # include "sm_resolve.h" -SM_RCSID("$Id: sm_resolve.c,v 8.24.4.6 2002/06/25 04:22:41 ca Exp $") +SM_RCSID("$Id: sm_resolve.c,v 8.24.4.7 2003/03/22 22:55:37 ca Exp $") static struct stot { @@ -172,10 +172,10 @@ parse_dns_reply(data, len) DNS_REPLY_T *r; RESOURCE_RECORD_T **rr; - r = (DNS_REPLY_T *) xalloc(sizeof(*r)); - memset(r, 0, sizeof(*r)); + r = (DNS_REPLY_T *) sm_malloc(sizeof(*r)); if (r == NULL) return NULL; + memset(r, 0, sizeof(*r)); p = data; @@ -227,12 +227,13 @@ parse_dns_reply(data, len) dns_free_data(r); return NULL; } - *rr = (RESOURCE_RECORD_T *) xalloc(sizeof(**rr)); + *rr = (RESOURCE_RECORD_T *) sm_malloc(sizeof(**rr)); if (*rr == NULL) { dns_free_data(r); return NULL; } + memset(*rr, 0, sizeof(**rr)); (*rr)->rr_domain = sm_strdup(host); if ((*rr)->rr_domain == NULL) { @@ -274,7 +275,7 @@ parse_dns_reply(data, len) } l = strlen(host) + 1; (*rr)->rr_u.rr_mx = (MX_RECORD_T *) - xalloc(sizeof(*((*rr)->rr_u.rr_mx)) + l); + sm_malloc(sizeof(*((*rr)->rr_u.rr_mx)) + l); if ((*rr)->rr_u.rr_mx == NULL) { dns_free_data(r); @@ -295,7 +296,7 @@ parse_dns_reply(data, len) } l = strlen(host) + 1; (*rr)->rr_u.rr_srv = (SRV_RECORDT_T*) - xalloc(sizeof(*((*rr)->rr_u.rr_srv)) + l); + sm_malloc(sizeof(*((*rr)->rr_u.rr_srv)) + l); if ((*rr)->rr_u.rr_srv == NULL) { dns_free_data(r); @@ -330,7 +331,7 @@ parse_dns_reply(data, len) dns_free_data(r); return NULL; } - (*rr)->rr_u.rr_txt = (char *) xalloc(txtlen + 1); + (*rr)->rr_u.rr_txt = (char *) sm_malloc(txtlen + 1); if ((*rr)->rr_u.rr_txt == NULL) { dns_free_data(r); @@ -341,8 +342,8 @@ parse_dns_reply(data, len) break; default: - (*rr)->rr_u.rr_data = (unsigned char*) xalloc(size); - if (size != 0 && (*rr)->rr_u.rr_data == NULL) + (*rr)->rr_u.rr_data = (unsigned char*) sm_malloc(size); + if ((*rr)->rr_u.rr_data == NULL) { dns_free_data(r); return NULL; diff --git a/contrib/sendmail/src/srvrsmtp.c b/contrib/sendmail/src/srvrsmtp.c index 2be4d65..a7f03dd 100644 --- a/contrib/sendmail/src/srvrsmtp.c +++ b/contrib/sendmail/src/srvrsmtp.c @@ -16,7 +16,7 @@ # include <libmilter/mfdef.h> #endif /* MILTER */ -SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.829.2.21 2003/01/15 19:17:14 ca Exp $") +SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.829.2.22 2003/02/19 02:45:40 ca Exp $") #if SASL || STARTTLS # include <sys/time.h> @@ -517,8 +517,6 @@ smtp(nullserver, d_flags, e) } hostname = macvalue('j', e); - - #if SASL sasl_ok = bitset(SRV_OFFER_AUTH, features); n_mechs = 0; diff --git a/contrib/sendmail/src/tls.c b/contrib/sendmail/src/tls.c index 10a6fe2..a74c691 100644 --- a/contrib/sendmail/src/tls.c +++ b/contrib/sendmail/src/tls.c @@ -10,7 +10,7 @@ #include <sendmail.h> -SM_RCSID("@(#)$Id: tls.c,v 8.79.4.2 2003/01/23 23:16:24 ca Exp $") +SM_RCSID("@(#)$Id: tls.c,v 8.79.4.4 2003/03/20 00:03:42 ca Exp $") #if STARTTLS # include <openssl/err.h> diff --git a/contrib/sendmail/src/usersmtp.c b/contrib/sendmail/src/usersmtp.c index 3a7d54f..59a23e9 100644 --- a/contrib/sendmail/src/usersmtp.c +++ b/contrib/sendmail/src/usersmtp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2003 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: usersmtp.c,v 8.437.2.8 2002/12/12 17:40:07 ca Exp $") +SM_RCSID("@(#)$Id: usersmtp.c,v 8.437.2.9 2003/03/15 23:57:52 gshapiro Exp $") #include <sysexits.h> @@ -2823,6 +2823,7 @@ smtpgetstat(m, mci, e) ENVELOPE *e; { int r; + int off; int status, xstat; char *enhsc; @@ -2844,13 +2845,12 @@ smtpgetstat(m, mci, e) else status = EX_PROTOCOL; if (bitset(MCIF_ENHSTAT, mci->mci_flags) && - (r = isenhsc(SmtpReplyBuffer + 4, ' ')) > 0) - r += 5; + (off = isenhsc(SmtpReplyBuffer + 4, ' ')) > 0) + off += 5; else - r = 4; - e->e_statmsg = sm_rpool_strdup_x(e->e_rpool, &SmtpReplyBuffer[r]); - mci_setstat(mci, xstat, ENHSCN(enhsc, smtptodsn(r)), - SmtpReplyBuffer); + off = 4; + e->e_statmsg = sm_rpool_strdup_x(e->e_rpool, &SmtpReplyBuffer[off]); + mci_setstat(mci, xstat, ENHSCN(enhsc, smtptodsn(r)), SmtpReplyBuffer); if (LogLevel > 1 && status == EX_PROTOCOL) { sm_syslog(LOG_CRIT, e->e_id, diff --git a/contrib/sendmail/src/version.c b/contrib/sendmail/src/version.c index d8a2983..da877d7 100644 --- a/contrib/sendmail/src/version.c +++ b/contrib/sendmail/src/version.c @@ -13,6 +13,6 @@ #include <sm/gen.h> -SM_RCSID("@(#)$Id: version.c,v 8.104.2.14 2003/01/15 17:55:43 ca Exp $") +SM_RCSID("@(#)$Id: version.c,v 8.104.2.15 2003/03/19 21:19:53 ca Exp $") -char Version[] = "8.12.8"; +char Version[] = "8.12.9"; |