From 3c674fdc703cfcd040f14a18df8bf695a8327cdf Mon Sep 17 00:00:00 2001 From: gshapiro Date: Tue, 11 Jun 2002 21:16:51 +0000 Subject: Resolve conflicts from sendmail 8.12.4 import --- contrib/sendmail/src/aliases.5 | 2 +- contrib/sendmail/src/conf.c | 59 ++++++++++++++++++++++++++++++++++++++--- contrib/sendmail/src/conf.h | 12 ++++++++- contrib/sendmail/src/err.c | 2 +- contrib/sendmail/src/mailq.1 | 4 +-- contrib/sendmail/src/mci.c | 8 +++--- contrib/sendmail/src/savemail.c | 15 ++++++----- contrib/sendmail/src/sendmail.8 | 7 +++-- 8 files changed, 85 insertions(+), 24 deletions(-) (limited to 'contrib/sendmail/src') diff --git a/contrib/sendmail/src/aliases.5 b/contrib/sendmail/src/aliases.5 index cb1de4b..c6c96f9 100644 --- a/contrib/sendmail/src/aliases.5 +++ b/contrib/sendmail/src/aliases.5 @@ -9,7 +9,7 @@ .\" the sendmail distribution. .\" .\" -.\" $Id: aliases.5,v 1.1.1.5 2002/02/17 21:56:38 gshapiro Exp $ +.\" $Id: aliases.5,v 8.17 2000/12/14 23:09:46 gshapiro Exp $ .\" .\" $FreeBSD$ .\" diff --git a/contrib/sendmail/src/conf.c b/contrib/sendmail/src/conf.c index 06a48eb..fb0b795 100644 --- a/contrib/sendmail/src/conf.c +++ b/contrib/sendmail/src/conf.c @@ -13,7 +13,7 @@ #include -SM_RCSID("@(#)$Id: conf.c,v 1.1.1.12 2002/04/10 03:04:48 gshapiro Exp $") +SM_RCSID("@(#)$Id: conf.c,v 8.969 2002/05/24 23:48:55 gshapiro Exp $") /* $FreeBSD$ */ @@ -2329,6 +2329,25 @@ typedef unsigned int *pt_entry_t; # define SPT_BUFSIZE MAXLINE #endif /* ! SPT_BUFSIZE */ +#if _FFR_SPT_ALIGN + +/* +** It looks like the Compaq Tru64 5.1A now aligns argv and envp to +** 64 bit alignment, so unless each piece of argv and envp is a multiple +** of 8 bytes (including terminating NULL), initsetproctitle() won't use +** any of the space beyond argv[0]. Be sure to set SPT_ALIGN_SIZE if +** you use this FFR. +*/ + +# ifdef SPT_ALIGN_SIZE +# define SPT_ALIGN(x, align) ((((x) + SPT_ALIGN_SIZE) >> (align)) << (align)) +# else /* SPT_ALIGN_SIZE */ +# define SPT_ALIGN(x, align) (x) +# endif /* SPT_ALIGN_SIZE */ +#else /* _FFR_SPT_ALIGN */ +# define SPT_ALIGN(x, align) (x) +#endif /* _FFR_SPT_ALIGN */ + /* ** Pointers for setproctitle. ** This allows "ps" listings to give more useful information. @@ -2347,6 +2366,7 @@ initsetproctitle(argc, argv, envp) char **envp; { register int i; + int align; extern char **environ; /* @@ -2371,15 +2391,24 @@ initsetproctitle(argc, argv, envp) ** Determine how much space we can use for setproctitle. ** Use all contiguous argv and envp pointers starting at argv[0] */ + + align = -1; +#if _FFR_SPT_ALIGN +# ifdef SPT_ALIGN_SIZE + for (i = SPT_ALIGN_SIZE; i > 0; i >>= 1) + align++; +# endif /* SPT_ALIGN_SIZE */ +#endif /* _FFR_SPT_ALIGN */ + for (i = 0; i < argc; i++) { if (i == 0 || LastArgv + 1 == argv[i]) - LastArgv = argv[i] + strlen(argv[i]); + LastArgv = argv[i] + SPT_ALIGN(strlen(argv[i]), align); } for (i = 0; LastArgv != NULL && envp[i] != NULL; i++) { if (LastArgv + 1 == envp[i]) - LastArgv = envp[i] + strlen(envp[i]); + LastArgv = envp[i] + SPT_ALIGN(strlen(envp[i]), align); } } @@ -2744,7 +2773,8 @@ uname(name) { char buf[MAXLINE]; - while (sm_io_fgets(file, SM_TIME_DEFAULT, buf, MAXLINE) != NULL) + while (sm_io_fgets(file, SM_TIME_DEFAULT, + buf, sizeof buf) != NULL) { if (sm_io_sscanf(buf, "#define sysname \"%*[^\"]\"", NODE_LENGTH, name->nodename) > 0) @@ -5556,7 +5586,11 @@ char *CompileOptions[] = "PIPELINING", #endif /* PIPELINING */ #if SASL +# if SASL >= 20000 + "SASLv2", +# else /* SASL >= 20000 */ "SASL", +# endif /* SASL >= 20000 */ #endif /* SASL */ #if SCANF "SCANF", @@ -5833,6 +5867,9 @@ char *FFRCompileOptions[] = #if _FFR_CHECK_EOM "_FFR_CHECK_EOM", #endif /* _FFR_CHECK_EOM */ +#if _FFR_CHK_QUEUE + "_FFR_CHK_QUEUE", +#endif /* _FFR_CHK_QUEUE */ #if _FFR_CONTROL_MSTAT "_FFR_CONTROL_MSTAT", #endif /* _FFR_CONTROL_MSTAT */ @@ -5948,21 +5985,35 @@ char *FFRCompileOptions[] = #if _FFR_RESET_MACRO_GLOBALS "_FFR_RESET_MACRO_GLOBALS", #endif /* _FFR_RESET_MACRO_GLOBALS */ +#if _FFR_RESPOND_ALL + /* in vacation */ + "_FFR_RESPOND_ALL", +#endif /* _FFR_RESPOND_ALL */ #if _FFR_RHS "_FFR_RHS", #endif /* _FFR_RHS */ +#if _FFR_SASL_OPT_M + "_FFR_SASL_OPT_M", +#endif /* _FFR_SASL_OPT_M */ #if _FFR_SELECT_SHM "_FFR_SELECT_SHM", #endif /* _FFR_SELECT_SHM */ #if _FFR_SHM_STATUS "_FFR_SHM_STATUS", #endif /* _FFR_SHM_STATUS */ +#if _FFR_SMFI_OPENSOCKET + "_FFR_SMFI_OPENSOCKET", +#endif /* _FFR_SMFI_OPENSOCKET */ #if _FFR_SMTP_SSL "_FFR_SMTP_SSL", #endif /* _FFR_SMTP_SSL */ #if _FFR_SOFT_BOUNCE "_FFR_SOFT_BOUNCE", #endif /* _FFR_SOFT_BOUNCE */ +#if _FFR_SPT_ALIGN +/* Chris Adams of HiWAAY Informations Services */ + "_FFR_SPT_ALIGN", +#endif /* _FFR_SPT_ALIGN */ #if _FFR_TIMERS "_FFR_TIMERS", #endif /* _FFR_TIMERS */ diff --git a/contrib/sendmail/src/conf.h b/contrib/sendmail/src/conf.h index 2903b7b..df6f301 100644 --- a/contrib/sendmail/src/conf.h +++ b/contrib/sendmail/src/conf.h @@ -10,7 +10,7 @@ * the sendmail distribution. * * - * $Id: conf.h,v 1.1.1.12 2002/04/10 03:04:48 gshapiro Exp $ + * $Id: conf.h,v 8.562 2002/05/22 19:46:26 gshapiro Exp $ */ /* $FreeBSD$ */ @@ -135,6 +135,16 @@ struct rusage; /* forward declaration to get gcc to shut up in wait.h */ # endif /* ! AUTH_MECHANISMS */ #endif /* SASL */ +/* +** Default database permissions (alias, maps, etc.) +** Used by sendmail and libsmdb +*/ + +#ifndef DBMMODE +# define DBMMODE 0640 +#endif /* ! DBMMODE */ + + /********************************************************************** ** Compilation options. ** #define these to 1 if they are available; diff --git a/contrib/sendmail/src/err.c b/contrib/sendmail/src/err.c index ee57d684..3a75dd5 100644 --- a/contrib/sendmail/src/err.c +++ b/contrib/sendmail/src/err.c @@ -13,7 +13,7 @@ #include -SM_RCSID("@(#)$Id: err.c,v 1.1.1.7 2002/02/17 21:56:39 gshapiro Exp $") +SM_RCSID("@(#)$Id: err.c,v 8.189 2002/01/09 18:52:30 ca Exp $") /* $FreeBSD$ */ diff --git a/contrib/sendmail/src/mailq.1 b/contrib/sendmail/src/mailq.1 index 6f5a13e..6434b92 100644 --- a/contrib/sendmail/src/mailq.1 +++ b/contrib/sendmail/src/mailq.1 @@ -1,4 +1,4 @@ -.\" Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers. +.\" Copyright (c) 1998-2000, 2002 Sendmail, Inc. and its suppliers. .\" All rights reserved. .\" Copyright (c) 1983, 1997 Eric P. Allman. All rights reserved. .\" Copyright (c) 1985, 1990, 1993 @@ -9,7 +9,7 @@ .\" the sendmail distribution. .\" .\" -.\" $Id: mailq.1,v 1.1.1.6 2002/02/17 21:56:39 gshapiro Exp $ +.\" $Id: mailq.1,v 8.19 2002/04/12 05:07:58 gshapiro Exp $ .\" .\" $FreeBSD$ .\" diff --git a/contrib/sendmail/src/mci.c b/contrib/sendmail/src/mci.c index e5c43b2..a487196 100644 --- a/contrib/sendmail/src/mci.c +++ b/contrib/sendmail/src/mci.c @@ -15,7 +15,7 @@ #include -SM_RCSID("@(#)$Id: mci.c,v 1.1.1.7 2002/04/10 03:04:50 gshapiro Exp $") +SM_RCSID("@(#)$Id: mci.c,v 8.205 2002/05/24 18:53:48 gshapiro Exp $") #if NETINET || NETINET6 # include @@ -656,7 +656,7 @@ mci_lock_host_statfile(mci) { int save_errno = errno; int retVal = EX_OK; - char fname[MAXPATHLEN + 1]; + char fname[MAXPATHLEN]; if (HostStatDir == NULL || mci->mci_host == NULL) return EX_OK; @@ -775,7 +775,7 @@ mci_load_persistent(mci) int save_errno = errno; bool locked = true; SM_FILE_T *fp; - char fname[MAXPATHLEN + 1]; + char fname[MAXPATHLEN]; if (mci == NULL) { @@ -1062,7 +1062,7 @@ mci_traverse_persistent(action, pathname) size_t len; char *newptr; struct dirent *e; - char newpath[MAXPATHLEN + 1]; + char newpath[MAXPATHLEN]; if ((d = opendir(pathname)) == NULL) { diff --git a/contrib/sendmail/src/savemail.c b/contrib/sendmail/src/savemail.c index da386e2..e354443 100644 --- a/contrib/sendmail/src/savemail.c +++ b/contrib/sendmail/src/savemail.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -15,7 +15,7 @@ #include -SM_RCSID("@(#)$Id: savemail.c,v 1.1.1.9 2002/02/17 21:56:41 gshapiro Exp $") +SM_RCSID("@(#)$Id: savemail.c,v 8.299 2002/05/24 20:50:17 gshapiro Exp $") static void errbody __P((MCI *, ENVELOPE *, char *)); static bool pruneroute __P((char *)); @@ -67,6 +67,7 @@ savemail(e, sendbody) int flags; long sff; char buf[MAXLINE + 1]; + char dlbuf[MAXPATHLEN]; SM_MBDB_T user; @@ -367,20 +368,20 @@ savemail(e, sendbody) p = macvalue('g', e); macdefine(&e->e_macro, A_PERM, 'g', e->e_sender); - expand("\201z/dead.letter", buf, sizeof buf, e); + expand("\201z/dead.letter", dlbuf, sizeof dlbuf, e); sff = SFF_CREAT|SFF_REGONLY|SFF_RUNASREALUID; if (RealUid == 0) sff |= SFF_ROOTOK; - e->e_to = buf; - if (writable(buf, NULL, sff) && - mailfile(buf, FileMailer, NULL, sff, e) == EX_OK) + e->e_to = dlbuf; + if (writable(dlbuf, NULL, sff) && + mailfile(dlbuf, FileMailer, NULL, sff, e) == EX_OK) { int oldverb = Verbose; if (OpMode != MD_DAEMON && OpMode != MD_SMTP) Verbose = 1; if (Verbose > 0) - message("Saved message in %s", buf); + message("Saved message in %s", dlbuf); Verbose = oldverb; macdefine(&e->e_macro, A_PERM, 'g', p); state = ESM_DONE; diff --git a/contrib/sendmail/src/sendmail.8 b/contrib/sendmail/src/sendmail.8 index 2abfedd..ee7175f 100644 --- a/contrib/sendmail/src/sendmail.8 +++ b/contrib/sendmail/src/sendmail.8 @@ -1,4 +1,4 @@ -.\" Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers. +.\" Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers. .\" All rights reserved. .\" Copyright (c) 1983, 1997 Eric P. Allman. All rights reserved. .\" Copyright (c) 1988, 1991, 1993 @@ -9,7 +9,7 @@ .\" the sendmail distribution. .\" .\" -.\" $Id: sendmail.8,v 1.1.1.6 2002/02/17 21:56:41 gshapiro Exp $ +.\" $Id: sendmail.8,v 8.51 2002/05/24 15:42:13 ca Exp $ .\" .\" $FreeBSD$ .\" @@ -95,8 +95,7 @@ the ``From:'' and ``Sender:'' fields are examined for the name of the sender. .TP .B \-bd -Run as a daemon. This requires Berkeley -IPC. +Run as a daemon. .B Sendmail will fork and run in background listening on socket 25 for incoming -- cgit v1.1