summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail/src
diff options
context:
space:
mode:
authorgshapiro <gshapiro@FreeBSD.org>2006-08-17 05:10:43 +0000
committergshapiro <gshapiro@FreeBSD.org>2006-08-17 05:10:43 +0000
commit0a9c74f73599b0ca2981b57815b436d1f6de6191 (patch)
tree5f8206fabf17de836a5a6161ba1e0d5ff61638e4 /contrib/sendmail/src
parent1024e3943e17bd4407f0cf3a799cfa05d59f1059 (diff)
downloadFreeBSD-src-0a9c74f73599b0ca2981b57815b436d1f6de6191.zip
FreeBSD-src-0a9c74f73599b0ca2981b57815b436d1f6de6191.tar.gz
Import sendmail 8.13.8
Diffstat (limited to 'contrib/sendmail/src')
-rw-r--r--contrib/sendmail/src/main.c10
-rw-r--r--contrib/sendmail/src/queue.c18
-rw-r--r--contrib/sendmail/src/srvrsmtp.c7
-rw-r--r--contrib/sendmail/src/version.c4
4 files changed, 30 insertions, 9 deletions
diff --git a/contrib/sendmail/src/main.c b/contrib/sendmail/src/main.c
index d81d386..0d6928d 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.944 2006/04/21 23:56:42 ca Exp $")
+SM_RCSID("@(#)$Id: main.c,v 8.944.2.2 2006/08/03 22:05:03 ca Exp $")
#if NETINET || NETINET6
@@ -2289,6 +2289,8 @@ main(argc, argv, envp)
{
char dtype[200];
+ /* avoid cleanup in finis(), DaemonPid will be set below */
+ DaemonPid = 0;
if (!run_in_foreground && !tTd(99, 100))
{
/* put us in background */
@@ -2321,7 +2323,10 @@ main(argc, argv, envp)
dtype[0] = '\0';
if (OpMode == MD_DAEMON)
+ {
(void) sm_strlcat(dtype, "+SMTP", sizeof dtype);
+ DaemonPid = CurrentPid;
+ }
if (QueueIntvl > 0)
{
(void) sm_strlcat2(dtype,
@@ -2903,6 +2908,9 @@ finis(drop, cleanup, exitstat)
dropenvelope(CurEnv, true, false);
sm_rpool_free(CurEnv->e_rpool);
CurEnv->e_rpool = NULL;
+
+ /* this may have pointed to the rpool */
+ CurEnv->e_to = NULL;
}
else
poststats(StatFile);
diff --git a/contrib/sendmail/src/queue.c b/contrib/sendmail/src/queue.c
index 151cd48..6fd2315 100644
--- a/contrib/sendmail/src/queue.c
+++ b/contrib/sendmail/src/queue.c
@@ -14,7 +14,7 @@
#include <sendmail.h>
#include <sm/sem.h>
-SM_RCSID("@(#)$Id: queue.c,v 8.954 2006/04/22 01:07:00 ca Exp $")
+SM_RCSID("@(#)$Id: queue.c,v 8.954.2.5 2006/07/31 21:44:18 ca Exp $")
#include <dirent.h>
@@ -2646,6 +2646,7 @@ gatherq(qgrp, qdir, doall, full, more)
/* avoid work if possible */
if ((QueueSortOrder == QSO_BYFILENAME ||
QueueSortOrder == QSO_BYMODTIME ||
+ QueueSortOrder == QSO_NONE ||
QueueSortOrder == QSO_RANDOM) &&
QueueLimitQuarantine == NULL &&
QueueLimitSender == NULL &&
@@ -6312,7 +6313,19 @@ filesys_find(name, path, add)
for (i = 0; i < NumFileSys; ++i)
{
if (FILE_SYS_DEV(i) == st.st_dev)
+ {
+ /*
+ ** Make sure the file system (FS) name is set:
+ ** even though the source code indicates that
+ ** FILE_SYS_DEV() is only set below, it could be
+ ** set via shared memory, hence we need to perform
+ ** this check/assignment here.
+ */
+
+ if (NULL == FILE_SYS_NAME(i))
+ FILE_SYS_NAME(i) = name;
return i;
+ }
}
if (i >= MAXFILESYS)
{
@@ -6406,8 +6419,7 @@ filesys_update()
static time_t nextupdate = 0;
#if SM_CONF_SHM
- /* only the daemon updates this structure */
- if (ShmId == SM_SHM_NO_ID || DaemonPid != CurrentPid)
+ if (ShmId != SM_SHM_NO_ID && DaemonPid != CurrentPid)
return;
#endif /* SM_CONF_SHM */
now = curtime();
diff --git a/contrib/sendmail/src/srvrsmtp.c b/contrib/sendmail/src/srvrsmtp.c
index c75214f..d95b5a5 100644
--- a/contrib/sendmail/src/srvrsmtp.c
+++ b/contrib/sendmail/src/srvrsmtp.c
@@ -17,7 +17,7 @@
# include <libmilter/mfdef.h>
#endif /* MILTER */
-SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.924.2.2 2006/05/31 20:56:37 ca Exp $")
+SM_RCSID("@(#)$Id: srvrsmtp.c,v 8.924.2.5 2006/07/07 16:29:39 ca Exp $")
#include <sm/time.h>
#include <sm/fdset.h>
@@ -851,8 +851,9 @@ smtp(nullserver, d_flags, e)
char state;
char *response;
- response = milter_connect(peerhostname, RealHostAddr,
- e, &state);
+ q = macvalue(macid("{client_name}"), e);
+ SM_ASSERT(q != NULL);
+ response = milter_connect(q, RealHostAddr, e, &state);
switch (state)
{
case SMFIR_REPLYCODE: /* REPLYCODE shouldn't happen */
diff --git a/contrib/sendmail/src/version.c b/contrib/sendmail/src/version.c
index 812d1eb..f577728 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.163.2.4 2006/06/05 22:32:40 ca Exp $")
+SM_RCSID("@(#)$Id: version.c,v 8.163.2.8 2006/07/26 17:24:02 ca Exp $")
-char Version[] = "8.13.7";
+char Version[] = "8.13.8";
OpenPOWER on IntegriCloud