diff options
author | gshapiro <gshapiro@FreeBSD.org> | 2006-03-22 16:40:03 +0000 |
---|---|---|
committer | gshapiro <gshapiro@FreeBSD.org> | 2006-03-22 16:40:03 +0000 |
commit | ef9770707c0f88e94a0c4a409f8fb74cea250716 (patch) | |
tree | f3bd1c133ce6e698fd2ff3c0280c7103bfac7af3 /contrib/sendmail/src/daemon.c | |
parent | 3f99651e549f30e601bcde5ce7907ee58c365442 (diff) | |
download | FreeBSD-src-ef9770707c0f88e94a0c4a409f8fb74cea250716.zip FreeBSD-src-ef9770707c0f88e94a0c4a409f8fb74cea250716.tar.gz |
Import sendmail 8.13.6
Security: FreeBSD-SA-06:13.sendmail
Diffstat (limited to 'contrib/sendmail/src/daemon.c')
-rw-r--r-- | contrib/sendmail/src/daemon.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/contrib/sendmail/src/daemon.c b/contrib/sendmail/src/daemon.c index 69a5f61..9bbde39 100644 --- a/contrib/sendmail/src/daemon.c +++ b/contrib/sendmail/src/daemon.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2005 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2006 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: daemon.c,v 8.658 2005/02/02 18:19:28 ca Exp $") +SM_RCSID("@(#)$Id: daemon.c,v 8.665 2006/03/02 19:12:00 ca Exp $") #if defined(SOCK_STREAM) || defined(__GNU_LIBRARY__) # define USE_SOCK_STREAM 1 @@ -34,7 +34,7 @@ SM_RCSID("@(#)$Id: daemon.c,v 8.658 2005/02/02 18:19:28 ca Exp $") # include <openssl/rand.h> #endif /* STARTTLS */ -#include <sys/time.h> +#include <sm/time.h> #if IP_SRCROUTE && NETINET # include <netinet/in_systm.h> @@ -90,9 +90,6 @@ typedef struct daemon DAEMON_T; #define SAFE_NOTSET (-1) /* SuperSafe (per daemon) option not set */ /* see also sendmail.h: SuperSafe values */ -#define DM_NOTSET (-1) /* DeliveryMode (per daemon) option not set */ -/* see also sendmail.h: values for e_sendmode -- send modes */ - static void connecttimeout __P((int)); static int opendaemonsocket __P((DAEMON_T *, bool)); static unsigned short setupdaemon __P((SOCKADDR *)); @@ -390,8 +387,8 @@ getrequests(e) #endif /* _FFR_QUEUE_RUN_PARANOIA */ } #if _FFR_QUEUE_RUN_PARANOIA - else if (QueueIntvl > 0 && - lastrun + QueueIntvl + 60 < now) + else if (CheckQueueRunners > 0 && QueueIntvl > 0 && + lastrun + QueueIntvl + CheckQueueRunners < now) { /* @@ -764,7 +761,6 @@ getrequests(e) set_delivery_mode( Daemons[curdaemon].d_dm, e); #endif /* _FFR_DM_PER_DAEMON */ - sm_setproctitle(true, e, "startup with %s", anynet_ntoa(&RealHostAddr)); @@ -1455,6 +1451,12 @@ setsockaddroptions(p, d) if (d->d_addr.sa.sa_family == AF_UNSPEC) d->d_addr.sa.sa_family = AF_INET; #endif /* NETINET */ +#if _FFR_SS_PER_DAEMON + d->d_supersafe = SAFE_NOTSET; +#endif /* _FFR_SS_PER_DAEMON */ +#if _FFR_DM_PER_DAEMON + d->d_dm = DM_NOTSET; +#endif /* _FFR_DM_PER_DAEMON */ while (p != NULL) { @@ -1476,12 +1478,6 @@ setsockaddroptions(p, d) continue; if (isascii(*f) && islower(*f)) *f = toupper(*f); -#if _FFR_SS_PER_DAEMON - d->d_supersafe = SAFE_NOTSET; -#endif /* _FFR_SS_PER_DAEMON */ -#if _FFR_DM_PER_DAEMON - d->d_dm = DM_NOTSET; -#endif /* _FFR_DM_PER_DAEMON */ switch (*f) { @@ -1496,7 +1492,7 @@ setsockaddroptions(p, d) case SM_QUEUE: case SM_DEFER: case SM_DELIVER: - case SM_FORK: + case SM_FORK: d->d_dm = *v; break; default: |