Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/gnu/dist/sendmail Pull up revisions 1.4-1.7 (requested ...



details:   https://anonhg.NetBSD.org/src/rev/5fcb4698fdba
branches:  netbsd-1-5
changeset: 490793:5fcb4698fdba
user:      he <he%NetBSD.org@localhost>
date:      Fri Mar 09 17:50:16 2001 +0000

description:
Pull up revisions 1.4-1.7 (requested by itojun):
  Upgrade to sendmail 8.11.3.

diffstat:

 gnu/dist/sendmail/sendmail/conf.h     |  52 +++++++++++++++++++++++++++----
 gnu/dist/sendmail/sendmail/sendmail.h |  57 +++++++++++++++++++++++-----------
 gnu/dist/sendmail/smrsh/smrsh.c       |  14 +++++---
 3 files changed, 92 insertions(+), 31 deletions(-)

diffs (truncated from 386 to 300 lines):

diff -r 401d55a560ac -r 5fcb4698fdba gnu/dist/sendmail/sendmail/conf.h
--- a/gnu/dist/sendmail/sendmail/conf.h Fri Mar 09 17:50:12 2001 +0000
+++ b/gnu/dist/sendmail/sendmail/conf.h Fri Mar 09 17:50:16 2001 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
  *     All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -10,7 +10,7 @@
  * the sendmail distribution.
  *
  *
- *     Id: conf.h,v 8.496.4.20 2000/07/15 17:35:19 gshapiro Exp
+ *     Id: conf.h,v 8.496.4.37 2001/02/12 21:40:16 gshapiro Exp
  */
 
 /*
@@ -90,6 +90,7 @@
 #define MAXSHORTSTR    203             /* max short string length */
 #define MAXMACNAMELEN  25              /* max macro name length */
 #define MAXMACROID     0377            /* max macro id number */
+                                       /* Must match (BITMAPBITS - 1) */
 #ifndef MAXHDRSLEN
 # define MAXHDRSLEN    (32 * 1024)     /* max size of message headers */
 #endif /* ! MAXHDRSLEN */
@@ -487,6 +488,9 @@
 #  endif /* ! __svr4__ */
 #  define GIDSET_T     gid_t
 #  define USE_SA_SIGACTION     1       /* use sa_sigaction field */
+#  if _FFR_MILTER
+#   define BROKEN_PTHREAD_SLEEP        1       /* sleep after pthread_create() fails */
+#  endif /* _FFR_MILTER */
 #  ifndef _PATH_UNIX
 #   define _PATH_UNIX          "/dev/ksyms"
 #  endif /* ! _PATH_UNIX */
@@ -525,18 +529,27 @@
 #  endif /* SOLARIS >= 20500 || (SOLARIS < 10000 && SOLARIS >= 205) */
 #  if SOLARIS >= 20600 || (SOLARIS < 10000 && SOLARIS >= 206)
 #   define HASSNPRINTF 1               /* has snprintf starting in 2.6 */
+#  else /* SOLARIS >= 20600 || (SOLARIS < 10000 && SOLARIS >= 206) */
+#   if _FFR_MILTER
+#    define SM_INT32   int     /* 32bit integer */
+#   endif /* _FFR_MILTER */
 #  endif /* SOLARIS >= 20600 || (SOLARIS < 10000 && SOLARIS >= 206) */
 #  if SOLARIS >= 20700 || (SOLARIS < 10000 && SOLARIS >= 207)
 #   ifndef LA_TYPE
 #    include <sys/loadavg.h>
-#    define LA_TYPE    LA_SUBR         /* getloadavg(3c) appears in 2.7 */
+#    if SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209)
+#     include <sys/pset.h>
+#     define LA_TYPE   LA_PSET /* pset_getloadavg(3c) appears in 2.9 */
+#    else
+#     define LA_TYPE   LA_SUBR /* getloadavg(3c) appears in 2.7 */
+#    endif /* SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209) */
 #   endif /* ! LA_TYPE */
 #   define HASGETUSERSHELL 1   /* getusershell(3c) bug fixed in 2.7 */
 #  endif /* SOLARIS >= 20700 || (SOLARIS < 10000 && SOLARIS >= 207) */
 #  if SOLARIS >= 20800 || (SOLARIS < 10000 && SOLARIS >= 208)
-#   undef NETINET6
-#   define NETINET6    1       /* IPv6 added in 2.8 */
 #   define HASSTRL     1       /* str*(3) added in 2.8 */
+#   undef _PATH_SENDMAILPID    /* tmpfs /var/run added in 2.8 */
+#   define _PATH_SENDMAILPID   "/var/run/sendmail.pid"
 #  endif /* SOLARIS >= 20800 || (SOLARIS < 10000 && SOLARIS >= 208) */
 #  ifndef HASGETUSERSHELL
 #   define HASGETUSERSHELL 0   /* getusershell(3) causes core dumps pre-2.7 */
@@ -956,6 +969,9 @@
 # if defined(__NetBSD__) && ((__NetBSD_Version__ > 102070000) || (NetBSD1_2 > 8) || defined(NetBSD1_4) || defined(NetBSD1_3))
 #   define HASURANDOMDEV       1       /* has /dev/urandom(4) */
 # endif /* defined(__NetBSD__) && ((__NetBSD_Version__ > 102070000) || (NetBSD1_2 > 8) || defined(NetBSD1_4) || defined(NetBSD1_3)) */
+# if defined(__NetBSD__) && defined(__NetBSD_Version__) && __NetBSD_Version__ >= 104170000
+#  define HASSETUSERCONTEXT    1       /* BSDI-style login classes */
+# endif
 # if defined(__FreeBSD__)
 #  define HASSETLOGIN  1       /* has setlogin(2) */
 #  if __FreeBSD_version >= 227001
@@ -994,6 +1010,12 @@
 #   define HASSTRL     0       /* strlcat(3) is broken in 2.5 and earlier */
 #  else /* OpenBSD < 199912 */
 #   define HASSTRL     1       /* has strlc{py,at}(3) functions */
+#   if OpenBSD >= 200006
+#    define HASSRANDOMDEV      1       /* has srandomdev(3) */
+#   endif
+#   if OpenBSD >= 200012
+#    define HASSETUSERCONTEXT  1       /* BSDI-style login classes */
+#   endif
 #  endif /* OpenBSD < 199912 */
 # endif /* defined(__OpenBSD__) */
 #endif /* defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */
@@ -1696,6 +1718,7 @@
 # define __svr4__
 # define SYS5SIGNALS           1
 # define HASSETSID             1
+# define HASSNPRINTF           1
 # define HASSETREUID           1
 # define HASWAITPID            1
 # define HASGETDTABLESIZE      1
@@ -1715,6 +1738,10 @@
 # ifndef _PATH_SENDMAILPID
 #  define _PATH_SENDMAILPID    "/etc/sendmail.pid"
 # endif /* ! _PATH_SENDMAILPID */
+# undef offsetof               /* avoid stddefs.h, sys/sysmacros.h conflict */
+#if !defined(SM_SET_H_ERRNO) && defined(_REENTRANT)
+# define SM_SET_H_ERRNO(err)   set_h_errno((err))
+#endif /* ! SM_SET_H_ERRNO && _REENTRANT */
 #endif /* __svr5__ */
 
 /* ###################################################################### */
@@ -2710,6 +2737,10 @@
 # define FORK          fork            /* function to call to fork mailer */
 #endif /* ! FORK */
 
+/* setting h_errno */
+#ifndef SM_SET_H_ERRNO
+# define SM_SET_H_ERRNO(err)   h_errno = (err)
+#endif /* SM_SET_H_ERRNO */
 
 /* random routine -- set above using #ifdef _osname_ or in Makefile */
 #if HASRANDOM
@@ -2789,9 +2820,14 @@
 # define LOG_DEBUG     7       /* debug-level messages */
 #endif /* !LOG */
 
-#if SFIO && defined(ERRLIST_PREDEFINED)
-# undef ERRLIST_PREDEFINED
-#endif /* SFIO && defined(ERRLIST_PREDEFINED) */
+#if SFIO
+# ifdef ERRLIST_PREDEFINED
+#  undef ERRLIST_PREDEFINED
+# endif /* ERRLIST_PREDEFINED */
+# if !HASSNPRINTF
+#  define HASSNPRINTF  1       /* sfio includes snprintf() */
+# endif /* !HASSNPRINTF */
+#endif /* SFIO */
 
 #ifndef SFIO_STDIO_COMPAT
 # define SFIO_STDIO_COMPAT     0
diff -r 401d55a560ac -r 5fcb4698fdba gnu/dist/sendmail/sendmail/sendmail.h
--- a/gnu/dist/sendmail/sendmail/sendmail.h     Fri Mar 09 17:50:12 2001 +0000
+++ b/gnu/dist/sendmail/sendmail/sendmail.h     Fri Mar 09 17:50:16 2001 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
  *     All rights reserved.
  * Copyright (c) 1983, 1995-1997 Eric P. Allman.  All rights reserved.
  * Copyright (c) 1988, 1993
@@ -20,7 +20,7 @@
 #ifdef _DEFINE
 # define EXTERN
 # ifndef lint
-static char SmailId[] =        "@(#)Id: sendmail.h,v 8.517.4.28 2000/07/18 02:24:44 gshapiro Exp";
+static char SmailId[] =        "@(#)Id: sendmail.h,v 8.517.4.50 2001/02/22 18:56:24 gshapiro Exp";
 # endif /* ! lint */
 #else /* _DEFINE */
 # define EXTERN extern
@@ -152,6 +152,9 @@
 #ifndef INT32SZ
 # define INT32SZ       4               /* size of a 32 bit integer in bytes */
 #endif /* ! INT32SZ */
+#ifndef INADDR_LOOPBACK
+# define INADDR_LOOPBACK       0x7f000001      /* loopback address */
+#endif /* ! INADDR_LOOPBACK */
 
 /*
 **  Error return from inet_addr(3), in case not defined in /usr/include.
@@ -226,14 +229,14 @@
 #define QS_QUEUEUP     3               /* save address in queue */
 #define QS_VERIFIED    4               /* verified, but not expanded */
 #define QS_DONTSEND    5               /* don't send to this address */
-#define QS_EXPANDED    6               /* expanded */
-#define QS_SENDER      7               /* message sender (MeToo) */
-#define QS_CLONED      8               /* addr cloned to a split envelope */
-#define QS_DISCARDED   9               /* recipient discarded (EF_DISCARD) */
-#define QS_REPLACED    10              /* maplocaluser()/UserDB replaced */
-#define QS_REMOVED     11              /* removed (removefromlist()) */
-#define QS_DUPLICATE   12              /* duplicate suppressed */
-#define QS_INCLUDED    13              /* :include: delivery */
+#define QS_EXPANDED    6               /* QS_DONTSEND: expanded */
+#define QS_SENDER      7               /* QS_DONTSEND: message sender (MeToo) */
+#define QS_CLONED      8               /* QS_DONTSEND: addr cloned to split envelope */
+#define QS_DISCARDED   9               /* QS_DONTSEND: rcpt discarded (EF_DISCARD) */
+#define QS_REPLACED    10              /* QS_DONTSEND: maplocaluser()/UserDB replaced */
+#define QS_REMOVED     11              /* QS_DONTSEND: removed (removefromlist()) */
+#define QS_DUPLICATE   12              /* QS_DONTSEND: duplicate suppressed */
+#define QS_INCLUDED    13              /* QS_DONTSEND: :include: delivery */
 
 /* address state testing primitives */
 #define QS_IS_OK(s)            ((s) == QS_OK)
@@ -459,6 +462,8 @@
 #else /* STARTTLS */
 #define MCIF_EXTENS    (MCIF_EXPN | MCIF_SIZE | MCIF_8BITMIME | MCIF_DSN | MCIF_8BITOK | MCIF_AUTH | MCIF_ENHSTAT)
 #endif /* STARTTLS */
+#define MCIF_ONLY_EHLO 0x10000000      /* use only EHLO in smtpinit */
+
 
 /* states */
 #define MCIS_CLOSED    0               /* no traffic on this connection */
@@ -542,6 +547,7 @@
 #define CHHDR_DEF      0x0001  /* default header */
 #define CHHDR_CHECK    0x0002  /* call ruleset for header */
 #define CHHDR_USER     0x0004  /* header from user */
+#define CHHDR_QUEUE    0x0008  /* header from qf file */
 
 /* functions */
 extern void    addheader __P((char *, char *, int, HDR **));
@@ -589,6 +595,12 @@
        char            **e_fromdomain; /* the domain part of the sender */
        ADDRESS         *e_sendqueue;   /* list of message recipients */
        ADDRESS         *e_errorqueue;  /* the queue for error responses */
+
+       /*
+       **  Overflow detection is based on < 0, so don't change this
+       **  to unsigned.  We don't use unsigned and == ULONG_MAX because
+       **  some libc's don't have strtoul(), see mail_esmtp_args().
+       */
        long            e_msgsize;      /* size of the message in bytes */
        long            e_flags;        /* flags, see below */
        int             e_nrcpts;       /* number of recipients */
@@ -620,7 +632,7 @@
        int             e_ntries;       /* number of delivery attempts */
        dev_t           e_dfdev;        /* df file's device, for crash recov */
        ino_t           e_dfino;        /* df file's ino, for crash recovery */
-       char            *e_macro[256];  /* macro definitions */
+       char            *e_macro[MAXMACROID + 1]; /* macro definitions */
        char            *e_if_macros[2]; /* HACK: incoming interface info */
        char            *e_auth_param;
        TIMERS          e_timers;       /* per job timers */
@@ -656,6 +668,7 @@
 #define EF_IS_MIME     0x0400000L      /* really is a MIME message */
 #define EF_DONT_MIME   0x0800000L      /* never MIME this message */
 #define EF_DISCARD     0x1000000L      /* discard the message */
+#define EF_TOOBIG      0x2000000L      /* message is too big */
 
 /* values for e_if_macros */
 #define EIF_ADDR       0               /* ${if_addr} */
@@ -768,7 +781,7 @@
 extern int     macid __P((char *, char **));
 extern char    *macname __P((int));
 extern char    *macvalue __P((int, ENVELOPE *));
-extern int     rscheck __P((char *, char *, char *, ENVELOPE *, bool, bool, int));
+extern int     rscheck __P((char *, char *, char *, ENVELOPE *, bool, bool, int, char *));
 extern void    setclass __P((int, char *));
 extern int     strtorwset __P((char *, char **, int));
 extern void    translate_dollars __P((char *));
@@ -868,7 +881,6 @@
 #define MF_DEFER       0x00080000      /* don't lookup map in defer mode */
 #define MF_SINGLEMATCH 0x00100000      /* successful only if match one key */
 #define MF_NOREWRITE   0x00200000      /* don't rewrite result, return as-is */
-#define MF_SHARED      0x00400000      /* map connection is shared */
 
 #define DYNOPENMAP(map) if (!bitset(MF_OPEN, (map)->map_mflags)) \
        {       \
@@ -1368,6 +1380,7 @@
 # define SMFS_OPEN             'O'     /* connected to remote milter filter */
 # define SMFS_INMSG            'M'     /* currently servicing a message */
 # define SMFS_DONE             'D'     /* done with current message */
+# define SMFS_CLOSABLE         'Q'     /* done with current connection */
 # define SMFS_ERROR            'E'     /* error state */
 # define SMFS_READY            'R'     /* ready for action */
 
@@ -1421,17 +1434,22 @@
 */
 
 /* d_flags, see daemon.c */
-/* generic rule: lower case: required, upper case: No */
+/* general rule: lower case: required, upper case: No */
 #define D_AUTHREQ      'a'     /* authentication required */
 #define D_BINDIF       'b'     /* use if_addr for outgoing connection */
 #define D_CANONREQ     'c'     /* canonification required (cf) */
 #define D_IFNHELO      'h'     /* use if name for HELO */
 #define D_FQMAIL       'f'     /* fq sender address required (cf) */
+#if _FFR_TLS_CLT1
+#define D_CLTNOTLS     'S'     /* don't use STARTTLS in client */
+#endif /* _FFR_TLS_CLT1 */
 #define D_FQRCPT       'r'     /* fq recipient address required (cf) */
 #define D_UNQUALOK     'u'     /* unqualified address is ok (cf) */
 #define D_NOCANON      'C'     /* no canonification (cf) */
 #define D_NOETRN       'E'     /* no ETRN (MSA) */
 #define D_ETRNONLY     ((char)0x01)    /* allow only ETRN (disk low) */
+#define D_OPTIONAL     'O'     /* optional socket */
+#define D_DISABLE      ((char)0x02)    /* optional socket disabled */
 
 /* Flags for submitmode */
 #define SUBMIT_UNKNOWN 0x0000  /* unknown agent type */
@@ -1664,6 +1682,7 @@
 EXTERN bool    IgnrDot;        /* don't let dot end messages */
 EXTERN bool    InChild;        /* true if running in an SMTP subprocess */
 EXTERN bool    LogUsrErrs;     /* syslog user errors (e.g., SMTP RCPT cmd) */
+EXTERN bool    MapOpenErr;     /* error opening a non-optional map */
 EXTERN bool    MatchGecos;     /* look for user names in gecos field */
 EXTERN bool    MeToo;          /* send to the sender also */
 EXTERN bool    NoAlias;        /* suppress aliasing */
@@ -1679,6 +1698,9 @@
 EXTERN bool    SuperSafe;      /* be extra careful, even if expensive */
 EXTERN bool    SuprErrs;       /* set if we are suppressing errors */
 EXTERN bool    TryNullMXList;  /* if we are the best MX, try host directly */
+#if _FFR_WORKAROUND_BROKEN_NAMESERVERS



Home | Main Index | Thread Index | Old Index