summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/usr.sbin/sendmail/KNOWNBUGS8
-rw-r--r--gnu/usr.sbin/sendmail/RELEASE_NOTES53
-rw-r--r--gnu/usr.sbin/sendmail/cf/cf/Makefile5
-rw-r--r--gnu/usr.sbin/sendmail/cf/m4/proto.m44
-rw-r--r--gnu/usr.sbin/sendmail/cf/m4/version.m44
-rw-r--r--gnu/usr.sbin/sendmail/cf/mailer/local.m46
-rw-r--r--gnu/usr.sbin/sendmail/cf/ostype/dragonfly.m420
-rw-r--r--gnu/usr.sbin/sendmail/contrib/qtool.82
-rw-r--r--gnu/usr.sbin/sendmail/editmap/editmap.c6
-rw-r--r--gnu/usr.sbin/sendmail/include/libmilter/mfapi.h4
-rw-r--r--gnu/usr.sbin/sendmail/include/sm/clock.h9
-rw-r--r--gnu/usr.sbin/sendmail/include/sm/conf.h27
-rw-r--r--gnu/usr.sbin/sendmail/include/sm/config.h3
-rw-r--r--gnu/usr.sbin/sendmail/include/sm/os/sm_os_dragonfly.h33
-rw-r--r--gnu/usr.sbin/sendmail/libmilter/comm.c3
-rw-r--r--gnu/usr.sbin/sendmail/libmilter/engine.c4
-rw-r--r--gnu/usr.sbin/sendmail/libmilter/listener.c9
-rw-r--r--gnu/usr.sbin/sendmail/libmilter/signal.c7
-rw-r--r--gnu/usr.sbin/sendmail/libmilter/sm_gethost.c7
-rw-r--r--gnu/usr.sbin/sendmail/libmilter/smfi.c3
-rw-r--r--gnu/usr.sbin/sendmail/libsm/Makefile4
-rw-r--r--gnu/usr.sbin/sendmail/libsm/b-strcmp.c8
-rw-r--r--gnu/usr.sbin/sendmail/libsm/clock.c13
-rw-r--r--gnu/usr.sbin/sendmail/libsm/debug.c13
-rw-r--r--gnu/usr.sbin/sendmail/libsm/fclose.c5
-rw-r--r--gnu/usr.sbin/sendmail/libsm/fopen.c6
-rw-r--r--gnu/usr.sbin/sendmail/libsm/fpos.c5
-rw-r--r--gnu/usr.sbin/sendmail/libsm/fseek.c5
-rw-r--r--gnu/usr.sbin/sendmail/libsm/heap.c5
-rw-r--r--gnu/usr.sbin/sendmail/libsm/ldap.c8
-rw-r--r--gnu/usr.sbin/sendmail/libsm/rpool.c7
-rw-r--r--gnu/usr.sbin/sendmail/libsm/smstdio.c4
-rw-r--r--gnu/usr.sbin/sendmail/libsm/stdio.c7
-rw-r--r--gnu/usr.sbin/sendmail/libsm/strio.c9
-rw-r--r--gnu/usr.sbin/sendmail/libsm/t-event.c13
-rw-r--r--gnu/usr.sbin/sendmail/libsm/t-shm.c6
-rw-r--r--gnu/usr.sbin/sendmail/libsm/ungetc.c8
-rw-r--r--gnu/usr.sbin/sendmail/libsm/vfprintf.c7
-rw-r--r--gnu/usr.sbin/sendmail/libsm/vfscanf.c9
-rw-r--r--gnu/usr.sbin/sendmail/libsm/vsscanf.c87
-rw-r--r--gnu/usr.sbin/sendmail/libsmdb/smdb.c4
-rw-r--r--gnu/usr.sbin/sendmail/libsmdb/smdb1.c54
-rw-r--r--gnu/usr.sbin/sendmail/libsmutil/safefile.c6
-rw-r--r--gnu/usr.sbin/sendmail/mail.local/mail.local.c51
-rw-r--r--gnu/usr.sbin/sendmail/makemap/makemap.c8
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/README6
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/bf.c4
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/collect.c15
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/conf.c24
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/control.c7
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/daemon.c19
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/deliver.c27
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/domain.c6
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/headers.c4
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/helpfile4
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/map.c8
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/mci.c4
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/milter.c26
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/mime.c8
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/parseaddr.c4
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/queue.c5
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/readcf.c3
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/recipient.c7
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/sasl.c16
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/savemail.c5
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/sendmail.h13
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/sfsasl.c23
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/sm_resolve.c6
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/srvrsmtp.c15
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/tls.c5
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/usersmtp.c18
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/util.c5
-rw-r--r--gnu/usr.sbin/sendmail/sendmail/version.c4
-rw-r--r--gnu/usr.sbin/sendmail/smrsh/smrsh.86
-rw-r--r--gnu/usr.sbin/sendmail/smrsh/smrsh.c10
-rw-r--r--gnu/usr.sbin/sendmail/vacation/vacation.c32
76 files changed, 581 insertions, 327 deletions
diff --git a/gnu/usr.sbin/sendmail/KNOWNBUGS b/gnu/usr.sbin/sendmail/KNOWNBUGS
index 4c394eff646..f6ea7afc325 100644
--- a/gnu/usr.sbin/sendmail/KNOWNBUGS
+++ b/gnu/usr.sbin/sendmail/KNOWNBUGS
@@ -41,6 +41,12 @@ This list is not guaranteed to be complete.
characters then no header check is done even if one is configured for
the header.
+* Header lines which are too long will be split incorrectly.
+
+ Header lines which are longer than 2045 characters will be split
+ but some characters might be lost. Fix: obey RFC (2)822 and do not
+ send lines that are longer than 1000 characters.
+
* Sender addresses whose domain part cause a temporary A record lookup
failure but have a valid MX record will be temporarily rejected in
the default configuration. Solution: fix the DNS at the sender side.
@@ -241,4 +247,4 @@ Kresolve sequence dnsmx canon
be used if set instead of LOCAL_RELAY ($R). This will be fixed in a
future version.
-$Revision: 1.8 $, Last updated $Date: 2003/01/01 19:59:19 $
+$Revision: 1.9 $, Last updated $Date: 2004/12/16 00:21:29 $
diff --git a/gnu/usr.sbin/sendmail/RELEASE_NOTES b/gnu/usr.sbin/sendmail/RELEASE_NOTES
index 687973469b5..4497eacfdfe 100644
--- a/gnu/usr.sbin/sendmail/RELEASE_NOTES
+++ b/gnu/usr.sbin/sendmail/RELEASE_NOTES
@@ -1,11 +1,62 @@
SENDMAIL RELEASE NOTES
- $Sendmail: RELEASE_NOTES,v 8.1679 2004/07/30 18:03:07 ca Exp $
+ $Sendmail: RELEASE_NOTES,v 8.1702 2004/12/14 17:36:31 ca Exp $
This listing shows the version of the sendmail binary, the version
of the sendmail configuration files, the date of release, and a
summary of the changes in that release.
+8.13.2/8.13.2 2004/12/15
+ Do not split the first header even if it exceeds the internal
+ buffer size. Previously a part of such a header would
+ end up in the body of the message. Problem noted by
+ Simple Nomad of BindView.
+ Do not complain about "cataddr: string too long" when checking
+ headers that do not contain RFC 2822 addresses.
+ Problem noted by Rich Graves of Brandeis University.
+ If a server returns a 421 reply to the RSET command between
+ message deliveries, do not attempt to deliver any more
+ messages on that connection. This prevents bogus "Bad
+ file number" recipient status. Problem noted by
+ Allan E Johannesen of Worcester Polytechnic Institute.
+ Allow trailing white space in EHLO command as recommended by RFC
+ 2821. Problem noted by Ralph Santagato of SBC Services.
+ Deal with clients which use AUTH but negotiate a smaller buffer size
+ for data exchanges than the value used by sendmail, e.g.,
+ Cyrus IMAP lmtp server. Based on patch by Jamie Clark.
+ When passing ESMTP arguments for RCPT to a milter, do not cut
+ them off at a comma. Problem noted by Krzysztof Oledzki.
+ Add more logging to milter change header functions to
+ complement existing logging. Based on patch from
+ Gurusamy Sarathy of Active State.
+ Include <lber.h> in include/sm/config.h when LDAPMAP is defined.
+ Patch from Edgar Hoch of the University of Stuttgart.
+ Fix DNS lookup if IPv6 is enabled when converting an IP address
+ to a hostname for use with SASL. Problem noted by Ken Jones;
+ patch from Hajimu UMEMOTO.
+ CONFIG: For consistency enable MODIFY_MAILER_FLAGS for the prog
+ mailer. Patch from John Beck of Sun Microsystems.
+ LIBMILTER: It was possible that xxfi_abort() was called after
+ xxfi_eom() for a message if some timeouts were triggered.
+ Patch from Alexey Kravchuk.
+ LIBMILTER: Slightly rearrange mutex use in listener.c to allow
+ different threads to call smfi_opensocket() and smfi_main().
+ Patch from Jordan Ritter of Cloudmark.
+ MAIL.LOCAL: Properly terminate MBDB before exiting. Problem
+ noted by Nelson Fung.
+ MAIL.LOCAL: make strip-mail.local used a wrong path to access
+ mail.local. Problem noted by William Park.
+ VACATION: Properly terminate MBDB before exiting. Problem noted
+ by Nelson Fung.
+ Portability:
+ Add support for DragonFly BSD.
+ New Files:
+ cf/ostype/dragonfly.m4
+ devtools/OS/DragonFly
+ include/sm/os/sm_os_dragonfly.h
+ Deleted Files:
+ libsm/vsscanf.c
+
8.13.1/8.13.1 2004/07/30
Using the default AliasFile ldap: specification would cause the
objectClasses of the LDAP response to be included in the
diff --git a/gnu/usr.sbin/sendmail/cf/cf/Makefile b/gnu/usr.sbin/sendmail/cf/cf/Makefile
index 58ab26e5b04..40175374047 100644
--- a/gnu/usr.sbin/sendmail/cf/cf/Makefile
+++ b/gnu/usr.sbin/sendmail/cf/cf/Makefile
@@ -1,8 +1,8 @@
-# $OpenBSD: Makefile,v 1.20 2004/06/24 03:59:24 millert Exp $
+# $OpenBSD: Makefile,v 1.21 2004/12/16 00:21:29 millert Exp $
#
# Makefile for configuration files.
#
-# $Sendmail: Makefile,v 8.58 2003/10/20 22:01:00 ca Exp $
+# $Sendmail: Makefile,v 8.59 2004/08/06 03:54:05 gshapiro Exp $
#
#
@@ -152,6 +152,7 @@ M4FILES=\
${CFDIR}/ostype/darwin.m4 \
${CFDIR}/ostype/dgux.m4 \
${CFDIR}/ostype/domainos.m4 \
+ ${CFDIR}/ostype/dragonfly.m4 \
${CFDIR}/ostype/dynix3.2.m4 \
${CFDIR}/ostype/freebsd4.m4 \
${CFDIR}/ostype/freebsd5.m4 \
diff --git a/gnu/usr.sbin/sendmail/cf/m4/proto.m4 b/gnu/usr.sbin/sendmail/cf/m4/proto.m4
index ef72d6a69f3..732cf1e1f10 100644
--- a/gnu/usr.sbin/sendmail/cf/m4/proto.m4
+++ b/gnu/usr.sbin/sendmail/cf/m4/proto.m4
@@ -13,7 +13,7 @@ divert(-1)
#
divert(0)
-VERSIONID(`$Sendmail: proto.m4,v 8.710 2004/07/27 17:32:48 ca Exp $')
+VERSIONID(`$Sendmail: proto.m4,v 8.711 2004/08/04 21:29:55 ca Exp $')
# level CF_LEVEL config file format
V`'CF_LEVEL/ifdef(`VENDOR_NAME', `VENDOR_NAME', `Berkeley')
@@ -511,7 +511,7 @@ _OPTION(ClassFactor, `confWORK_CLASS_FACTOR', `1800')
_OPTION(RetryFactor, `confWORK_TIME_FACTOR', `90000')
# default character set
-_OPTION(DefaultCharSet, `confDEF_CHAR_SET', `iso-8859-1')
+_OPTION(DefaultCharSet, `confDEF_CHAR_SET', `unknown-8bit')
# service switch file (name hardwired on Solaris, Ultrix, OSF/1, others)
_OPTION(ServiceSwitchFile, `confSERVICE_SWITCH_FILE', `MAIL_SETTINGS_DIR`'service.switch')
diff --git a/gnu/usr.sbin/sendmail/cf/m4/version.m4 b/gnu/usr.sbin/sendmail/cf/m4/version.m4
index 753bd089259..e5525faef97 100644
--- a/gnu/usr.sbin/sendmail/cf/m4/version.m4
+++ b/gnu/usr.sbin/sendmail/cf/m4/version.m4
@@ -11,8 +11,8 @@ divert(-1)
# the sendmail distribution.
#
#
-VERSIONID(`$Sendmail: version.m4,v 8.117 2004/07/30 18:03:07 ca Exp $')
+VERSIONID(`$Sendmail: version.m4,v 8.124 2004/12/14 01:58:04 ca Exp $')
#
divert(0)
# Configuration version number
-DZ8.13.1`'ifdef(`confCF_VERSION', `/confCF_VERSION')
+DZ8.13.2`'ifdef(`confCF_VERSION', `/confCF_VERSION')
diff --git a/gnu/usr.sbin/sendmail/cf/mailer/local.m4 b/gnu/usr.sbin/sendmail/cf/mailer/local.m4
index 8ce1652788f..464e5c319e0 100644
--- a/gnu/usr.sbin/sendmail/cf/mailer/local.m4
+++ b/gnu/usr.sbin/sendmail/cf/mailer/local.m4
@@ -1,6 +1,6 @@
PUSHDIVERT(-1)
#
-# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2000, 2004 Sendmail, Inc. and its suppliers.
# All rights reserved.
# Copyright (c) 1983 Eric P. Allman. All rights reserved.
# Copyright (c) 1988, 1993
@@ -32,7 +32,7 @@ POPDIVERT
### Local and Program Mailer specification ###
##################################################
-VERSIONID(`$Sendmail: local.m4,v 8.58 2000/10/26 01:58:29 ca Exp $')
+VERSIONID(`$Sendmail: local.m4,v 8.59 2004/11/23 00:37:25 ca Exp $')
#
# Envelope sender rewriting
@@ -88,6 +88,6 @@ R$+ $@ $1 < @ *LOCAL* > add local qualification',
Mlocal, P=LOCAL_MAILER_PATH, F=_MODMF_(CONCAT(_DEF_LOCAL_MAILER_FLAGS, LOCAL_MAILER_FLAGS), `LOCAL'), LOCAL_RWR,_OPTINS(`LOCAL_MAILER_EOL', ` E=', `, ')
_OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')_OPTINS(`LOCAL_MAILER_MAXMSGS', `m=', `, ')_OPTINS(`LOCAL_MAILER_MAXRCPTS', `r=', `, ')_OPTINS(`LOCAL_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/LOCAL_MAILER_DSN_DIAGNOSTIC_CODE,_LOCAL_QGRP
A=LOCAL_MAILER_ARGS
-Mprog, P=LOCAL_SHELL_PATH, F=CONCAT(_DEF_LOCAL_SHELL_FLAGS, LOCAL_SHELL_FLAGS), S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, D=LOCAL_SHELL_DIR,
+Mprog, P=LOCAL_SHELL_PATH, F=_MODMF_(CONCAT(_DEF_LOCAL_SHELL_FLAGS, LOCAL_SHELL_FLAGS), `SHELL'), S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, D=LOCAL_SHELL_DIR,
_OPTINS(`LOCAL_MAILER_MAX', `M=', `, ')T=X-Unix/X-Unix/X-Unix,_PROG_QGRP
A=LOCAL_SHELL_ARGS
diff --git a/gnu/usr.sbin/sendmail/cf/ostype/dragonfly.m4 b/gnu/usr.sbin/sendmail/cf/ostype/dragonfly.m4
new file mode 100644
index 00000000000..5f0a02a3f6b
--- /dev/null
+++ b/gnu/usr.sbin/sendmail/cf/ostype/dragonfly.m4
@@ -0,0 +1,20 @@
+divert(-1)
+#
+# Copyright (c) 2001, 2004 Sendmail, Inc. and its suppliers.
+# All rights reserved.
+#
+# By using this file, you agree to the terms and conditions set
+# forth in the LICENSE file which can be found at the top level of
+# the sendmail distribution.
+#
+#
+
+divert(0)
+VERSIONID(`$Sendmail: dragonfly.m4,v 1.1 2004/08/06 03:54:05 gshapiro Exp $')
+ifdef(`STATUS_FILE',, `define(`STATUS_FILE', `/var/log/sendmail.st')')dnl
+dnl turn on S flag for local mailer
+MODIFY_MAILER_FLAGS(`LOCAL', `+S')dnl
+ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/libexec/mail.local)')dnl
+ifdef(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail $u')')dnl
+ifdef(`UUCP_MAILER_PATH',, `define(`UUCP_MAILER_PATH', `/usr/local/bin/uux')')dnl
+ifdef(`UUCP_MAILER_ARGS',, `define(`UUCP_MAILER_ARGS', `uux - -r -z -a$g $h!rmail ($u)')')dnl
diff --git a/gnu/usr.sbin/sendmail/contrib/qtool.8 b/gnu/usr.sbin/sendmail/contrib/qtool.8
index b2ebe89c6fa..3080d8c195c 100644
--- a/gnu/usr.sbin/sendmail/contrib/qtool.8
+++ b/gnu/usr.sbin/sendmail/contrib/qtool.8
@@ -8,7 +8,7 @@
.\"
.\" $Sendmail: qtool.8,v 8.20 2004/06/28 17:49:41 ca Exp $
.\"
-.TH QTOOL 8 "$Date: 2004/09/18 04:08:34 $"
+.TH QTOOL 8 "$Date: 2004/12/16 00:21:29 $"
.SH NAME
qtool
\- manipulate sendmail queues
diff --git a/gnu/usr.sbin/sendmail/editmap/editmap.c b/gnu/usr.sbin/sendmail/editmap/editmap.c
index 6f3240d52af..a4c562eab05 100644
--- a/gnu/usr.sbin/sendmail/editmap/editmap.c
+++ b/gnu/usr.sbin/sendmail/editmap/editmap.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2002, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1992 Eric P. Allman. All rights reserved.
* Copyright (c) 1992, 1993
@@ -22,7 +22,7 @@ SM_UNUSED(static char copyright[]) =
#endif /* ! lint */
#ifndef lint
-SM_UNUSED(static char id[]) = "@(#)$Sendmail: editmap.c,v 1.23 2002/03/28 17:49:33 gshapiro Exp $";
+SM_UNUSED(static char id[]) = "@(#)$Sendmail: editmap.c,v 1.24 2004/08/03 18:40:10 ca Exp $";
#endif /* ! lint */
@@ -57,6 +57,8 @@ BITMAP256 DontBlameSendmail;
#define ISSEP(c) (isascii(c) && isspace(c))
+static void usage __P((char *));
+
static void
usage(progname)
char *progname;
diff --git a/gnu/usr.sbin/sendmail/include/libmilter/mfapi.h b/gnu/usr.sbin/sendmail/include/libmilter/mfapi.h
index b208c035e72..e22ba16645e 100644
--- a/gnu/usr.sbin/sendmail/include/libmilter/mfapi.h
+++ b/gnu/usr.sbin/sendmail/include/libmilter/mfapi.h
@@ -7,7 +7,7 @@
* the sendmail distribution.
*
*
- * $Sendmail: mfapi.h,v 8.59 2004/07/07 21:41:31 ca Exp $
+ * $Sendmail: mfapi.h,v 8.60 2004/08/20 21:24:14 ca Exp $
*/
/*
@@ -425,7 +425,6 @@ LIBMILTER_API int smfi_addrcpt __P((SMFICTX *, char *));
LIBMILTER_API int smfi_delrcpt __P((SMFICTX *, char *));
-#if _FFR_SMFI_PROGRESS
/*
** Send a "no-op" up to the MTA to tell it we're still alive, so long
** milter-side operations don't time out.
@@ -434,7 +433,6 @@ LIBMILTER_API int smfi_delrcpt __P((SMFICTX *, char *));
*/
LIBMILTER_API int smfi_progress __P((SMFICTX *));
-#endif /* _FFR_SMFI_PROGRESS */
/*
** Delete a recipient from the envelope
diff --git a/gnu/usr.sbin/sendmail/include/sm/clock.h b/gnu/usr.sbin/sendmail/include/sm/clock.h
index 64222849920..a54262c6d7c 100644
--- a/gnu/usr.sbin/sendmail/include/sm/clock.h
+++ b/gnu/usr.sbin/sendmail/include/sm/clock.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -9,7 +9,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
- * $Sendmail: clock.h,v 1.11 2001/05/14 23:25:37 gshapiro Exp $
+ * $Sendmail: clock.h,v 1.12 2004/08/03 19:57:21 ca Exp $
*/
/*
@@ -52,9 +52,8 @@ typedef struct sm_event SM_EVENT;
/* functions */
extern void sm_clrevent __P((SM_EVENT *));
extern void sm_clear_events __P((void));
-extern SM_EVENT *sm_setevent __P((time_t, void(*)(), int));
-extern SM_EVENT *sm_seteventm __P((int, void(*)(), int));
-extern SM_EVENT *sm_sigsafe_seteventm __P((int, void(*)(), int));
+extern SM_EVENT *sm_seteventm __P((int, void(*)__P((int)), int));
+extern SM_EVENT *sm_sigsafe_seteventm __P((int, void(*)__P((int)), int));
extern SIGFUNC_DECL sm_tick __P((int));
/*
diff --git a/gnu/usr.sbin/sendmail/include/sm/conf.h b/gnu/usr.sbin/sendmail/include/sm/conf.h
index c5669b92a31..ccea501625a 100644
--- a/gnu/usr.sbin/sendmail/include/sm/conf.h
+++ b/gnu/usr.sbin/sendmail/include/sm/conf.h
@@ -10,7 +10,7 @@
* the sendmail distribution.
*
*
- * $Sendmail: conf.h,v 1.116 2004/07/26 18:08:35 ca Exp $
+ * $Sendmail: conf.h,v 1.118 2004/08/20 20:30:32 ca Exp $
*/
/*
@@ -866,7 +866,7 @@ extern unsigned int sleepX __P((unsigned int seconds));
/*
-** FreeBSD / NetBSD / OpenBSD (all architectures, all versions)
+** DragonFly BSD/ FreeBSD / NetBSD / OpenBSD (all architectures, all versions)
**
** 4.3BSD clone, closer to 4.4BSD for FreeBSD 1.x and NetBSD 0.9x
** 4.4BSD-Lite based for FreeBSD 2.x and NetBSD 1.x
@@ -874,7 +874,7 @@ extern unsigned int sleepX __P((unsigned int seconds));
** See also BSD defines.
*/
-# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+# if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
# include <paths.h>
# define HASUNSETENV 1 /* has unsetenv(3) call */
# define HASSETSID 1 /* has POSIX setsid(2) call */
@@ -919,6 +919,23 @@ extern unsigned int sleepX __P((unsigned int seconds));
# include <sys/param.h>
# include <sys/sysctl.h>
# endif
+# if defined(__DragonFly__)
+# define HASSETLOGIN 1 /* has setlogin(2) */
+# define HASSRANDOMDEV 1 /* has srandomdev(3) */
+# define HASURANDOMDEV 1 /* has /dev/urandom(4) */
+# undef SPT_TYPE
+# include <libutil.h>
+# define SPT_TYPE SPT_BUILTIN
+# define HASSETUSERCONTEXT 1 /* BSDI-style login classes */
+# ifndef SMRSH_CMDDIR
+# define SMRSH_CMDDIR "/usr/libexec/sm.bin"
+# endif /* ! SMRSH_CMDDIR */
+# ifndef SMRSH_PATH
+# define SMRSH_PATH "/bin:/usr/bin"
+# endif /* ! SMRSH_PATH */
+# define USESYSCTL 1 /* use sysctl(3) for getting ncpus */
+# include <sys/sysctl.h>
+# endif /* defined(__DragonFly__) */
# if defined(__FreeBSD__)
# define HASSETLOGIN 1 /* has setlogin(2) */
# if __FreeBSD_version >= 227001
@@ -970,7 +987,7 @@ extern unsigned int sleepX __P((unsigned int seconds));
# define HASCLOSEFROM 1 /* closefrom(3) added in 3.5 */
# endif /* OpenBSD >= 200405 */
# endif /* defined(__OpenBSD__) */
-# endif /* defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */
+# endif /* defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) */
/*
@@ -2924,7 +2941,7 @@ struct sm_align
long al_l;
void *al_p;
double al_d;
- void (*al_f)();
+ void (*al_f) __P((void));
} al_u;
};
# define SM_ALIGN_SIZE offsetof(struct sm_align, al_u)
diff --git a/gnu/usr.sbin/sendmail/include/sm/config.h b/gnu/usr.sbin/sendmail/include/sm/config.h
index 02405bdce3f..a1db6b8f5a6 100644
--- a/gnu/usr.sbin/sendmail/include/sm/config.h
+++ b/gnu/usr.sbin/sendmail/include/sm/config.h
@@ -6,7 +6,7 @@
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
- * $Sendmail: config.h,v 1.46 2003/12/10 03:19:06 gshapiro Exp $
+ * $Sendmail: config.h,v 1.47 2004/10/26 21:41:07 gshapiro Exp $
*/
/*
@@ -145,6 +145,7 @@
/* LDAP Checks */
# if LDAPMAP
+# include <lber.h>
# include <ldap.h>
/* Does the LDAP library have ldap_memfree()? */
diff --git a/gnu/usr.sbin/sendmail/include/sm/os/sm_os_dragonfly.h b/gnu/usr.sbin/sendmail/include/sm/os/sm_os_dragonfly.h
new file mode 100644
index 00000000000..4a275cb8e58
--- /dev/null
+++ b/gnu/usr.sbin/sendmail/include/sm/os/sm_os_dragonfly.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2000-2001, 2004 Sendmail, Inc. and its suppliers.
+ * All rights reserved.
+ *
+ * By using this file, you agree to the terms and conditions set
+ * forth in the LICENSE file which can be found at the top level of
+ * the sendmail distribution.
+ *
+ * $Sendmail: sm_os_dragonfly.h,v 1.1 2004/08/06 03:54:07 gshapiro Exp $
+ */
+
+/*
+** Platform definitions for DragonFly BSD
+*/
+
+#define SM_OS_NAME "dragonfly"
+
+#define SM_CONF_SYS_CDEFS_H 1
+
+#define MI_SOMAXCONN -1 /* listen() max backlog for milter */
+
+#ifndef SM_CONF_STRL
+# define SM_CONF_STRL 1
+#endif /* SM_CONF_STRL */
+#ifndef SM_CONF_SHM
+# define SM_CONF_SHM 1
+#endif /* SM_CONF_SHM */
+#ifndef SM_CONF_SEM
+# define SM_CONF_SEM 1
+#endif /* SM_CONF_SEM */
+#ifndef SM_CONF_MSG
+# define SM_CONF_MSG 1
+#endif /* SM_CONF_MSG */
diff --git a/gnu/usr.sbin/sendmail/libmilter/comm.c b/gnu/usr.sbin/sendmail/libmilter/comm.c
index 55124a897a2..d5861163acf 100644
--- a/gnu/usr.sbin/sendmail/libmilter/comm.c
+++ b/gnu/usr.sbin/sendmail/libmilter/comm.c
@@ -9,12 +9,13 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: comm.c,v 8.65 2004/07/07 21:41:30 ca Exp $")
+SM_RCSID("@(#)$Sendmail: comm.c,v 8.66 2004/08/20 20:38:35 ca Exp $")
#include "libmilter.h"
#include <sm/errstring.h>
#include <sys/uio.h>
+static ssize_t retry_writev __P((socket_t, struct iovec *, int, struct timeval *));
static size_t Maxdatasize = MILTER_MAX_DATA_SIZE;
#if _FFR_MAXDATASIZE
diff --git a/gnu/usr.sbin/sendmail/libmilter/engine.c b/gnu/usr.sbin/sendmail/libmilter/engine.c
index a8087d66f20..88a564ae355 100644
--- a/gnu/usr.sbin/sendmail/libmilter/engine.c
+++ b/gnu/usr.sbin/sendmail/libmilter/engine.c
@@ -9,7 +9,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: engine.c,v 8.119 2003/12/02 18:53:57 ca Exp $")
+SM_RCSID("@(#)$Sendmail: engine.c,v 8.120 2004/10/20 21:09:00 ca Exp $")
#include "libmilter.h"
@@ -347,6 +347,7 @@ mi_engine(ctx)
ctx->ctx_state = curstate;
}
arg.a_idx = cmds[i].cm_macros;
+ call_abort = ST_IN_MAIL(curstate);
/* call function to deal with command */
r = (*f)(&arg);
@@ -361,7 +362,6 @@ mi_engine(ctx)
break;
}
- call_abort = ST_IN_MAIL(curstate);
if (r == SMFIS_ACCEPT)
{
/* accept mail, no further actions taken */
diff --git a/gnu/usr.sbin/sendmail/libmilter/listener.c b/gnu/usr.sbin/sendmail/libmilter/listener.c
index 10538683a89..8437a3e8b96 100644
--- a/gnu/usr.sbin/sendmail/libmilter/listener.c
+++ b/gnu/usr.sbin/sendmail/libmilter/listener.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999-2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -9,7 +9,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: listener.c,v 8.109 2004/02/04 22:55:59 ca Exp $")
+SM_RCSID("@(#)$Sendmail: listener.c,v 8.111 2004/09/20 21:11:15 msk Exp $")
/*
** listener.c -- threaded network listener
@@ -32,6 +32,7 @@ static SOCKADDR_LEN_T L_socksize;
static socket_t listenfd = INVALID_SOCKET;
static socket_t mi_milteropen __P((char *, int, bool, char *));
+static void *mi_thread_handle_wrapper __P((void *));
/*
** MI_OPENSOCKET -- create the socket where this filter and the MTA will meet
@@ -88,6 +89,7 @@ mi_opensocket(conn, backlog, dbg, rmsocket, smfi)
return MI_FAILURE;
}
#endif /* !SM_CONF_POLL */
+ (void) smutex_unlock(&L_Mutex);
return MI_SUCCESS;
}
@@ -553,7 +555,7 @@ mi_milteropen(conn, backlog, rmsocket, name)
** results from mi_handle_session()
*/
-void *
+static void *
mi_thread_handle_wrapper(arg)
void *arg;
{
@@ -722,7 +724,6 @@ mi_listener(conn, dbg, smfi, timeout, backlog)
return MI_FAILURE;
clilen = L_socksize;
- (void) smutex_unlock(&L_Mutex);
while ((mistop = mi_stop()) == MILTER_CONT)
{
(void) smutex_lock(&L_Mutex);
diff --git a/gnu/usr.sbin/sendmail/libmilter/signal.c b/gnu/usr.sbin/sendmail/libmilter/signal.c
index ad9f3de94bd..4d30aa22c57 100644
--- a/gnu/usr.sbin/sendmail/libmilter/signal.c
+++ b/gnu/usr.sbin/sendmail/libmilter/signal.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999-2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -9,7 +9,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: signal.c,v 8.41 2003/11/19 00:25:20 ca Exp $")
+SM_RCSID("@(#)$Sendmail: signal.c,v 8.42 2004/08/20 21:10:30 ca Exp $")
#include "libmilter.h"
@@ -21,6 +21,9 @@ static smutex_t M_Mutex;
static int MilterStop = MILTER_CONT;
+static void *mi_signal_thread __P((void *));
+static int mi_spawn_signal_thread __P((char *));
+
/*
** MI_STOP -- return value of MilterStop
**
diff --git a/gnu/usr.sbin/sendmail/libmilter/sm_gethost.c b/gnu/usr.sbin/sendmail/libmilter/sm_gethost.c
index 25e77a733a8..73ce816410c 100644
--- a/gnu/usr.sbin/sendmail/libmilter/sm_gethost.c
+++ b/gnu/usr.sbin/sendmail/libmilter/sm_gethost.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1999-2001, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -9,12 +9,13 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: sm_gethost.c,v 8.26 2001/09/11 04:04:45 gshapiro Exp $")
+SM_RCSID("@(#)$Sendmail: sm_gethost.c,v 8.27 2004/08/20 21:12:37 ca Exp $")
#include <sendmail.h>
#if NETINET || NETINET6
# include <arpa/inet.h>
#endif /* NETINET || NETINET6 */
+#include "libmilter.h"
/*
** MI_GETHOSTBY{NAME,ADDR} -- compatibility routines for gethostbyXXX
@@ -29,6 +30,8 @@ SM_RCSID("@(#)$Sendmail: sm_gethost.c,v 8.26 2001/09/11 04:04:45 gshapiro Exp $"
#if NETINET6 && NEEDSGETIPNODE
+static struct hostent *getipnodebyname __P((char *, int, int, int *));
+
# ifndef AI_ADDRCONFIG
# define AI_ADDRCONFIG 0 /* dummy */
# endif /* ! AI_ADDRCONFIG */
diff --git a/gnu/usr.sbin/sendmail/libmilter/smfi.c b/gnu/usr.sbin/sendmail/libmilter/smfi.c
index 4a365ac0264..67d9926d355 100644
--- a/gnu/usr.sbin/sendmail/libmilter/smfi.c
+++ b/gnu/usr.sbin/sendmail/libmilter/smfi.c
@@ -9,11 +9,12 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: smfi.c,v 8.72 2004/05/05 00:07:21 msk Exp $")
+SM_RCSID("@(#)$Sendmail: smfi.c,v 8.73 2004/09/20 21:26:57 ca Exp $")
#include <sm/varargs.h>
#include "libmilter.h"
static int smfi_header __P((SMFICTX *, int, int, char *, char *));
+static int myisenhsc __P((const char *, int));
/* for smfi_set{ml}reply, let's be generous. 256/16 should be sufficient */
#define MAXREPLYLEN 980 /* max. length of a reply string */
diff --git a/gnu/usr.sbin/sendmail/libsm/Makefile b/gnu/usr.sbin/sendmail/libsm/Makefile
index d16cac7dfac..81adb502101 100644
--- a/gnu/usr.sbin/sendmail/libsm/Makefile
+++ b/gnu/usr.sbin/sendmail/libsm/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.4 2004/06/24 03:59:26 millert Exp $
+# $OpenBSD: Makefile,v 1.5 2004/12/16 00:21:30 millert Exp $
LIB= sm
SRCS= assert.c debug.c errstring.c exc.c heap.c match.c rpool.c strdup.c \
@@ -7,7 +7,7 @@ SRCS= assert.c debug.c errstring.c exc.c heap.c match.c rpool.c strdup.c \
fscanf.c fseek.c fvwrite.c fwalk.c fwrite.c get.c makebuf.c put.c \
refill.c rewind.c setvbuf.c smstdio.c snprintf.c sscanf.c stdio.c \
strio.c ungetc.c vasprintf.c vfprintf.c vfscanf.c vprintf.c \
- vsnprintf.c vsscanf.c wbuf.c wsetup.c string.c stringf.c \
+ vsnprintf.c wbuf.c wsetup.c string.c stringf.c \
xtrap.c strto.c test.c path.c strcasecmp.c strrevcmp.c signal.c \
clock.c config.c shm.c mbdb.c strexit.c cf.c ldap.c niprop.c
ENVDEF= -DNOT_SENDMAIL
diff --git a/gnu/usr.sbin/sendmail/libsm/b-strcmp.c b/gnu/usr.sbin/sendmail/libsm/b-strcmp.c
index f8da755e282..4b64f2e29c7 100644
--- a/gnu/usr.sbin/sendmail/libsm/b-strcmp.c
+++ b/gnu/usr.sbin/sendmail/libsm/b-strcmp.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -8,7 +8,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: b-strcmp.c,v 1.12 2001/09/11 04:04:47 gshapiro Exp $")
+SM_RCSID("@(#)$Sendmail: b-strcmp.c,v 1.13 2004/08/03 20:07:59 ca Exp $")
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -21,6 +21,10 @@ SM_RCSID("@(#)$Sendmail: b-strcmp.c,v 1.12 2001/09/11 04:04:47 gshapiro Exp $")
#define LOOPS 4000000L /* initial number of loops */
#define MAXTIME 30L /* "maximum" time to run single test */
+void fatal __P((char *));
+void purpose __P((void));
+int main __P((int, char *[]));
+
void
fatal(str)
char *str;
diff --git a/gnu/usr.sbin/sendmail/libsm/clock.c b/gnu/usr.sbin/sendmail/libsm/clock.c
index b986a29ee53..2815d7d360e 100644
--- a/gnu/usr.sbin/sendmail/libsm/clock.c
+++ b/gnu/usr.sbin/sendmail/libsm/clock.c
@@ -12,7 +12,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: clock.c,v 1.45 2004/01/19 19:32:08 ca Exp $")
+SM_RCSID("@(#)$Sendmail: clock.c,v 1.46 2004/08/03 19:57:22 ca Exp $")
#include <unistd.h>
#include <time.h>
#include <errno.h>
@@ -63,7 +63,7 @@ static SM_EVENT *volatile SmFreeEventList; /* list of free events */
SM_EVENT *
sm_seteventm(intvl, func, arg)
int intvl;
- void (*func)();
+ void (*func)__P((int));
int arg;
{
ENTER_CRITICAL();
@@ -86,7 +86,7 @@ sm_seteventm(intvl, func, arg)
SM_EVENT *
sm_sigsafe_seteventm(intvl, func, arg)
int intvl;
- void (*func)();
+ void (*func)__P((int));
int arg;
{
register SM_EVENT **evp;
@@ -394,7 +394,7 @@ sm_tick(sig)
#endif /* SM_CONF_SETITIMER */
))
{
- void (*f)();
+ void (*f)__P((int));
int arg;
pid_t pid;
@@ -497,7 +497,7 @@ sm_tick(sig)
# if !HAVE_NANOSLEEP
-static void sm_endsleep __P((void));
+static void sm_endsleep __P((int));
static bool volatile SmSleepDone;
# endif /* !HAVE_NANOSLEEP */
@@ -625,7 +625,8 @@ sleep(intvl)
#if !HAVE_NANOSLEEP
static void
-sm_endsleep()
+sm_endsleep(ignore)
+ int ignore;
{
/*
** NOTE: THIS CAN BE CALLED FROM A SIGNAL HANDLER. DO NOT ADD
diff --git a/gnu/usr.sbin/sendmail/libsm/debug.c b/gnu/usr.sbin/sendmail/libsm/debug.c
index ee556903a1f..16471ff89a0 100644
--- a/gnu/usr.sbin/sendmail/libsm/debug.c
+++ b/gnu/usr.sbin/sendmail/libsm/debug.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000, 2001, 2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000, 2001, 2003, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -8,7 +8,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: debug.c,v 1.29 2003/01/10 00:26:06 ca Exp $")
+SM_RCSID("@(#)$Sendmail: debug.c,v 1.30 2004/08/03 20:10:26 ca Exp $")
/*
** libsm debugging and tracing
@@ -26,6 +26,9 @@ SM_RCSID("@(#)$Sendmail: debug.c,v 1.29 2003/01/10 00:26:06 ca Exp $")
#include <sm/varargs.h>
#include <sm/heap.h>
+static void sm_debug_reset __P((void));
+static const char *parse_named_setting_x __P((const char *));
+
/*
** Abstractions for printing trace messages.
*/
@@ -187,7 +190,7 @@ const char SmDebugMagic[] = "sm_debug";
** none.
*/
-void
+static void
sm_debug_reset()
{
SM_DEBUG_T *debug;
@@ -254,7 +257,7 @@ sm_debug_addsetting_x(pattern, level)
static const char *
parse_named_setting_x(s)
- register const char *s;
+ const char *s;
{
const char *pat, *endpat;
int level;
@@ -315,7 +318,7 @@ parse_named_setting_x(s)
void
sm_debug_addsettings_x(s)
- register const char *s;
+ const char *s;
{
for (;;)
{
diff --git a/gnu/usr.sbin/sendmail/libsm/fclose.c b/gnu/usr.sbin/sendmail/libsm/fclose.c
index 1a047b65bed..f44eaf89ed7 100644
--- a/gnu/usr.sbin/sendmail/libsm/fclose.c
+++ b/gnu/usr.sbin/sendmail/libsm/fclose.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -13,7 +13,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: fclose.c,v 1.42 2002/02/01 02:28:00 ca Exp $")
+SM_RCSID("@(#)$Sendmail: fclose.c,v 1.43 2004/08/03 20:17:38 ca Exp $")
#include <errno.h>
#include <stdlib.h>
#include <sys/time.h>
@@ -26,6 +26,7 @@ SM_RCSID("@(#)$Sendmail: fclose.c,v 1.42 2002/02/01 02:28:00 ca Exp $")
#include <sm/clock.h>
#include "local.h"
+static void closealrm __P((int));
static jmp_buf CloseTimeOut;
/*
diff --git a/gnu/usr.sbin/sendmail/libsm/fopen.c b/gnu/usr.sbin/sendmail/libsm/fopen.c
index 0c184b266d2..523b38d685c 100644
--- a/gnu/usr.sbin/sendmail/libsm/fopen.c
+++ b/gnu/usr.sbin/sendmail/libsm/fopen.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -13,7 +13,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: fopen.c,v 1.60 2002/01/07 21:41:35 ca Exp $")
+SM_RCSID("@(#)$Sendmail: fopen.c,v 1.61 2004/08/03 20:17:38 ca Exp $")
#include <errno.h>
#include <setjmp.h>
#include <sys/time.h>
@@ -24,6 +24,8 @@ SM_RCSID("@(#)$Sendmail: fopen.c,v 1.60 2002/01/07 21:41:35 ca Exp $")
#include <sm/clock.h>
#include "local.h"
+static void openalrm __P((int));
+static void reopenalrm __P((int));
extern int sm_io_fclose __P((SM_FILE_T *));
static jmp_buf OpenTimeOut, ReopenTimeOut;
diff --git a/gnu/usr.sbin/sendmail/libsm/fpos.c b/gnu/usr.sbin/sendmail/libsm/fpos.c
index e20d3300379..cbd56c393f3 100644
--- a/gnu/usr.sbin/sendmail/libsm/fpos.c
+++ b/gnu/usr.sbin/sendmail/libsm/fpos.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -13,7 +13,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: fpos.c,v 1.37 2001/09/11 04:04:48 gshapiro Exp $")
+SM_RCSID("@(#)$Sendmail: fpos.c,v 1.38 2004/08/03 20:17:38 ca Exp $")
#include <errno.h>
#include <setjmp.h>
#include <sys/time.h>
@@ -24,6 +24,7 @@ SM_RCSID("@(#)$Sendmail: fpos.c,v 1.37 2001/09/11 04:04:48 gshapiro Exp $")
#include <sm/assert.h>
#include "local.h"
+static void tellalrm __P((int));
static jmp_buf TellTimeOut;
/*
diff --git a/gnu/usr.sbin/sendmail/libsm/fseek.c b/gnu/usr.sbin/sendmail/libsm/fseek.c
index 0fac33ffdbc..aac04ed3feb 100644
--- a/gnu/usr.sbin/sendmail/libsm/fseek.c
+++ b/gnu/usr.sbin/sendmail/libsm/fseek.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -13,7 +13,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: fseek.c,v 1.45 2001/09/11 04:04:48 gshapiro Exp $")
+SM_RCSID("@(#)$Sendmail: fseek.c,v 1.46 2004/08/03 20:17:38 ca Exp $")
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -29,6 +29,7 @@ SM_RCSID("@(#)$Sendmail: fseek.c,v 1.45 2001/09/11 04:04:48 gshapiro Exp $")
#define POS_ERR (-(off_t)1)
+static void seekalrm __P((int));
static jmp_buf SeekTimeOut;
/*
diff --git a/gnu/usr.sbin/sendmail/libsm/heap.c b/gnu/usr.sbin/sendmail/libsm/heap.c
index e4ea5fd47b8..629492f4480 100644
--- a/gnu/usr.sbin/sendmail/libsm/heap.c
+++ b/gnu/usr.sbin/sendmail/libsm/heap.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -8,7 +8,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: heap.c,v 1.50 2001/09/11 04:04:48 gshapiro Exp $")
+SM_RCSID("@(#)$Sendmail: heap.c,v 1.51 2004/08/03 20:32:00 ca Exp $")
/*
** debugging memory allocation package
@@ -43,6 +43,7 @@ SM_RCSID("@(#)$Sendmail: heap.c,v 1.50 2001/09/11 04:04:48 gshapiro Exp $")
SM_DEBUG_T SmHeapCheck = SM_DEBUG_INITIALIZER("sm_check_heap",
"@(#)$Debug: sm_check_heap - check sm_malloc, sm_realloc, sm_free calls $");
# define HEAP_CHECK sm_debug_active(&SmHeapCheck, 1)
+static int ptrhash __P((void *p));
#endif /* SM_HEAP_CHECK */
const SM_EXC_TYPE_T SmHeapOutOfMemoryType =
diff --git a/gnu/usr.sbin/sendmail/libsm/ldap.c b/gnu/usr.sbin/sendmail/libsm/ldap.c
index 4f36db3ed4d..d7bea04be88 100644
--- a/gnu/usr.sbin/sendmail/libsm/ldap.c
+++ b/gnu/usr.sbin/sendmail/libsm/ldap.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001-2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -8,7 +8,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: ldap.c,v 1.59 2003/12/23 21:20:15 gshapiro Exp $")
+SM_RCSID("@(#)$Sendmail: ldap.c,v 1.60 2004/08/03 20:42:21 ca Exp $")
#if LDAPMAP
# include <sys/types.h>
@@ -33,6 +33,8 @@ SM_DEBUG_T SmLDAPTrace = SM_DEBUG_INITIALIZER("sm_trace_ldap",
"@(#)$Debug: sm_trace_ldap - trace LDAP operations $");
static void ldaptimeout __P((int));
+static bool sm_ldap_has_objectclass __P((SM_LDAP_STRUCT *, LDAPMessage *, char *));
+static SM_LDAP_RECURSE_ENTRY *sm_ldap_add_recurse __P((SM_LDAP_RECURSE_LIST **, char *, int, SM_RPOOL_T *));
/*
** SM_LDAP_CLEAR -- set default values for SM_LDAP_STRUCT
@@ -126,7 +128,7 @@ sm_ldap_start(name, lmap)
SM_LDAP_STRUCT *lmap;
{
int bind_result;
- int save_errno;
+ int save_errno = 0;
char *id;
SM_EVENT *ev = NULL;
LDAP *ld = NULL;
diff --git a/gnu/usr.sbin/sendmail/libsm/rpool.c b/gnu/usr.sbin/sendmail/libsm/rpool.c
index e057c9ab441..9515c7c9c0c 100644
--- a/gnu/usr.sbin/sendmail/libsm/rpool.c
+++ b/gnu/usr.sbin/sendmail/libsm/rpool.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -8,7 +8,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: rpool.c,v 1.27 2003/10/09 17:49:47 ca Exp $")
+SM_RCSID("@(#)$Sendmail: rpool.c,v 1.28 2004/08/03 20:44:04 ca Exp $")
/*
** resource pools
@@ -32,6 +32,9 @@ typedef union
char align[SM_ALIGN_SIZE];
} SM_POOLHDR_T;
+static char *sm_rpool_allocblock_x __P((SM_RPOOL_T *, size_t));
+static char *sm_rpool_allocblock __P((SM_RPOOL_T *, size_t));
+
/*
** Tune this later
*/
diff --git a/gnu/usr.sbin/sendmail/libsm/smstdio.c b/gnu/usr.sbin/sendmail/libsm/smstdio.c
index 4a69406b833..51517c71f31 100644
--- a/gnu/usr.sbin/sendmail/libsm/smstdio.c
+++ b/gnu/usr.sbin/sendmail/libsm/smstdio.c
@@ -8,7 +8,7 @@
*/
#include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Sendmail: smstdio.c,v 1.33 2004/03/03 19:14:51 ca Exp $")
+SM_IDSTR(id, "@(#)$Sendmail: smstdio.c,v 1.34 2004/08/03 20:46:34 ca Exp $")
#include <unistd.h>
#include <stdio.h>
#include <fcntl.h>
@@ -19,6 +19,8 @@ SM_IDSTR(id, "@(#)$Sendmail: smstdio.c,v 1.33 2004/03/03 19:14:51 ca Exp $")
#include <sm/string.h>
#include "local.h"
+static void setup __P((SM_FILE_T *));
+
/*
** Overall:
** This is a file type which implements a layer on top of the system
diff --git a/gnu/usr.sbin/sendmail/libsm/stdio.c b/gnu/usr.sbin/sendmail/libsm/stdio.c
index cbe353bfa6e..c0e63d5dbb0 100644
--- a/gnu/usr.sbin/sendmail/libsm/stdio.c
+++ b/gnu/usr.sbin/sendmail/libsm/stdio.c
@@ -13,7 +13,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: stdio.c,v 1.68 2004/03/03 19:20:29 ca Exp $")
+SM_RCSID("@(#)$Sendmail: stdio.c,v 1.69 2004/08/03 20:46:34 ca Exp $")
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
@@ -29,6 +29,9 @@ SM_RCSID("@(#)$Sendmail: stdio.c,v 1.68 2004/03/03 19:20:29 ca Exp $")
#include <sm/fdset.h>
#include "local.h"
+static int sm_stdsetmode __P((SM_FILE_T *, const int *));
+static int sm_stdgetmode __P((SM_FILE_T *, int *));
+
/*
** Overall:
** Small standard I/O/seek/close functions.
@@ -260,7 +263,7 @@ sm_stdsetmode(fp, mode)
** Success: external mode value
*/
-int
+static int
sm_stdgetmode(fp, mode)
SM_FILE_T *fp;
int *mode;
diff --git a/gnu/usr.sbin/sendmail/libsm/strio.c b/gnu/usr.sbin/sendmail/libsm/strio.c
index 926429fd4fa..9b9bc2975c8 100644
--- a/gnu/usr.sbin/sendmail/libsm/strio.c
+++ b/gnu/usr.sbin/sendmail/libsm/strio.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -13,7 +13,7 @@
*/
#include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Sendmail: strio.c,v 1.42 2002/02/11 23:05:50 gshapiro Exp $")
+SM_IDSTR(id, "@(#)$Sendmail: strio.c,v 1.43 2004/08/03 20:48:30 ca Exp $")
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
@@ -25,6 +25,9 @@ SM_IDSTR(id, "@(#)$Sendmail: strio.c,v 1.42 2002/02/11 23:05:50 gshapiro Exp $")
#include <sm/conf.h>
#include "local.h"
+static int sm_strsetmode __P((SM_FILE_T*, const int *));
+static int sm_strgetmode __P((SM_FILE_T*, int *));
+
/*
** Cookie structure for the "strio" file type
*/
@@ -313,7 +316,7 @@ sm_strclose(fp)
** Failure: -1 and sets errno
*/
-int
+static int
sm_strsetmode(fp, mode)
SM_FILE_T *fp;
const int *mode;
diff --git a/gnu/usr.sbin/sendmail/libsm/t-event.c b/gnu/usr.sbin/sendmail/libsm/t-event.c
index 5fab1aa2d70..c19c14020c8 100644
--- a/gnu/usr.sbin/sendmail/libsm/t-event.c
+++ b/gnu/usr.sbin/sendmail/libsm/t-event.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2001-2002, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -8,7 +8,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: t-event.c,v 1.11 2002/04/25 01:50:25 ca Exp $")
+SM_RCSID("@(#)$Sendmail: t-event.c,v 1.12 2004/08/03 20:50:32 ca Exp $")
#include <stdio.h>
@@ -22,9 +22,12 @@ SM_RCSID("@(#)$Sendmail: t-event.c,v 1.11 2002/04/25 01:50:25 ca Exp $")
#include <sm/clock.h>
#include <sm/test.h>
-int check;
+static void evcheck __P((int));
+static void ev1 __P((int));
-void
+static int check;
+
+static void
evcheck(arg)
int arg;
{
@@ -33,7 +36,7 @@ evcheck(arg)
check++;
}
-void
+static void
ev1(arg)
int arg;
{
diff --git a/gnu/usr.sbin/sendmail/libsm/t-shm.c b/gnu/usr.sbin/sendmail/libsm/t-shm.c
index 89ff73152a6..103b2f15363 100644
--- a/gnu/usr.sbin/sendmail/libsm/t-shm.c
+++ b/gnu/usr.sbin/sendmail/libsm/t-shm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2002, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
*
* By using this file, you agree to the terms and conditions set
@@ -8,7 +8,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: t-shm.c,v 1.19 2004/04/20 23:14:21 ca Exp $")
+SM_RCSID("@(#)$Sendmail: t-shm.c,v 1.20 2004/08/03 20:51:36 ca Exp $")
#include <stdio.h>
@@ -145,6 +145,8 @@ shmbig(owner, size)
# define MAX_CNT 10
+int shmtest __P((int));
+
int
shmtest(owner)
int owner;
diff --git a/gnu/usr.sbin/sendmail/libsm/ungetc.c b/gnu/usr.sbin/sendmail/libsm/ungetc.c
index 5c6288f5fed..85ddf30376f 100644
--- a/gnu/usr.sbin/sendmail/libsm/ungetc.c
+++ b/gnu/usr.sbin/sendmail/libsm/ungetc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -13,7 +13,7 @@
*/
#include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Sendmail: ungetc.c,v 1.28 2001/09/11 04:04:49 gshapiro Exp $")
+SM_IDSTR(id, "@(#)$Sendmail: ungetc.c,v 1.29 2004/08/03 20:54:49 ca Exp $")
#include <stdlib.h>
#include <string.h>
@@ -26,6 +26,8 @@ SM_IDSTR(id, "@(#)$Sendmail: ungetc.c,v 1.28 2001/09/11 04:04:49 gshapiro Exp $"
#include <sm/conf.h>
#include "local.h"
+static void sm_submore_x __P((SM_FILE_T *));
+
/*
** SM_SUBMORE_X -- expand ungetc buffer
**
@@ -46,7 +48,7 @@ SM_IDSTR(id, "@(#)$Sendmail: ungetc.c,v 1.28 2001/09/11 04:04:49 gshapiro Exp $"
static void
sm_submore_x(fp)
- register SM_FILE_T *fp;
+ SM_FILE_T *fp;
{
register int i;
register unsigned char *p;
diff --git a/gnu/usr.sbin/sendmail/libsm/vfprintf.c b/gnu/usr.sbin/sendmail/libsm/vfprintf.c
index cae9cddf965..ca84a5700d1 100644
--- a/gnu/usr.sbin/sendmail/libsm/vfprintf.c
+++ b/gnu/usr.sbin/sendmail/libsm/vfprintf.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1990
* The Regents of the University of California. All rights reserved.
@@ -13,7 +13,7 @@
*/
#include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Sendmail: vfprintf.c,v 1.52 2001/09/11 04:04:49 gshapiro Exp $")
+SM_IDSTR(id, "@(#)$Sendmail: vfprintf.c,v 1.53 2004/08/03 20:54:49 ca Exp $")
/*
** Overall:
@@ -33,6 +33,7 @@ SM_IDSTR(id, "@(#)$Sendmail: vfprintf.c,v 1.52 2001/09/11 04:04:49 gshapiro Exp
#include "local.h"
#include "fvwrite.h"
+static int sm_bprintf __P((SM_FILE_T *, const char *, va_list));
static void sm_find_arguments __P((const char *, va_list , va_list **));
static void sm_grow_type_table_x __P((unsigned char **, int *));
static int sm_print __P((SM_FILE_T *, int, struct sm_uio *));
@@ -95,7 +96,7 @@ sm_print(fp, timeout, uio)
static int
sm_bprintf(fp, fmt, ap)
- register SM_FILE_T *fp;
+ SM_FILE_T *fp;
const char *fmt;
SM_VA_LOCAL_DECL
{
diff --git a/gnu/usr.sbin/sendmail/libsm/vfscanf.c b/gnu/usr.sbin/sendmail/libsm/vfscanf.c
index 046ad1d7366..3b8748c80eb 100644
--- a/gnu/usr.sbin/sendmail/libsm/vfscanf.c
+++ b/gnu/usr.sbin/sendmail/libsm/vfscanf.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2001 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2001, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -13,7 +13,7 @@
*/
#include <sm/gen.h>
-SM_IDSTR(id, "@(#)$Sendmail: vfscanf.c,v 1.51 2001/09/11 04:04:49 gshapiro Exp $")
+SM_IDSTR(id, "@(#)$Sendmail: vfscanf.c,v 1.52 2004/08/03 20:56:32 ca Exp $")
#include <ctype.h>
#include <stdlib.h>
@@ -60,8 +60,9 @@ SM_IDSTR(id, "@(#)$Sendmail: vfscanf.c,v 1.51 2001/09/11 04:04:49 gshapiro Exp $
#define CT_INT 3 /* integer, i.e., strtoll or strtoull */
#define CT_FLOAT 4 /* floating, i.e., strtod */
-static unsigned char *sm_sccl __P((char *, unsigned char *));
-static jmp_buf ScanTimeOut;
+static void scanalrm __P((int));
+static unsigned char *sm_sccl __P((char *, unsigned char *));
+static jmp_buf ScanTimeOut;
/*
** SCANALRM -- handler when timeout activated for sm_io_vfscanf()
diff --git a/gnu/usr.sbin/sendmail/libsm/vsscanf.c b/gnu/usr.sbin/sendmail/libsm/vsscanf.c
deleted file mode 100644
index 5a22780e55a..00000000000
--- a/gnu/usr.sbin/sendmail/libsm/vsscanf.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2000-2002 Sendmail, Inc. and its suppliers.
- * All rights reserved.
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Donn Seeley at UUNET Technologies, Inc.
- *
- * By using this file, you agree to the terms and conditions set
- * forth in the LICENSE file which can be found at the top level of
- * the sendmail distribution.
- */
-
-#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: vsscanf.c,v 1.23 2002/02/01 02:28:00 ca Exp $")
-#include <string.h>
-#include <sm/io.h>
-
-/*
-** SM_EOFREAD -- dummy read function for faked file below
-**
-** Parameters:
-** fp -- file pointer
-** buf -- location to place read data
-** len -- number of bytes to read
-**
-** Returns:
-** 0 (zero) always
-*/
-
-/* type declaration for later use */
-static ssize_t sm_eofread __P((SM_FILE_T *, char *, size_t));
-
-/* ARGSUSED0 */
-static ssize_t
-sm_eofread(fp, buf, len)
- SM_FILE_T *fp;
- char *buf;
- size_t len;
-{
- return 0;
-}
-
-/*
-** SM_VSSCANF -- scan a string to find data units
-**
-** Parameters:
-** str -- strings containing data
-** fmt -- format directive for finding data units
-** ap -- memory locations to place format found data units
-**
-** Returns:
-** Failure: SM_IO_EOF
-** Success: number of data units found
-**
-** Side Effects:
-** Attempts to strlen() 'str'; if not a '\0' terminated string
-** then the call may SEGV/fail.
-** Faking the string 'str' as a file.
-*/
-
-int
-sm_vsscanf(str, fmt, ap)
- const char *str;
- const char *fmt;
- SM_VA_LOCAL_DECL
-{
- SM_FILE_T fake;
-
- fake.sm_magic = SmFileMagic;
- fake.f_timeout = SM_TIME_FOREVER;
- fake.f_timeoutstate = SM_TIME_BLOCK;
- fake.f_file = -1;
- fake.f_flags = SMRD;
- fake.f_bf.smb_base = fake.f_p = (unsigned char *)str;
- fake.f_bf.smb_size = fake.f_r = strlen(str);
- fake.f_read = sm_eofread;
- fake.f_ub.smb_base = NULL;
- fake.f_close = NULL;
- fake.f_open = NULL;
- fake.f_write = NULL;
- fake.f_seek = NULL;
- fake.f_setinfo = fake.f_getinfo = NULL;
- fake.f_type = "sm_vsscanf:fake";
- return sm_vfscanf(&fake, SM_TIME_FOREVER, fmt, ap);
-}
diff --git a/gnu/usr.sbin/sendmail/libsmdb/smdb.c b/gnu/usr.sbin/sendmail/libsmdb/smdb.c
index 1d277a0b218..69f241d24e0 100644
--- a/gnu/usr.sbin/sendmail/libsmdb/smdb.c
+++ b/gnu/usr.sbin/sendmail/libsmdb/smdb.c
@@ -8,7 +8,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: smdb.c,v 8.57 2002/05/24 23:09:11 gshapiro Exp $")
+SM_RCSID("@(#)$Sendmail: smdb.c,v 8.58 2004/08/03 20:58:38 ca Exp $")
#include <fcntl.h>
#include <stdlib.h>
@@ -18,6 +18,8 @@ SM_RCSID("@(#)$Sendmail: smdb.c,v 8.57 2002/05/24 23:09:11 gshapiro Exp $")
#include <sendmail/sendmail.h>
#include <libsmdb/smdb.h>
+static bool smdb_lockfile __P((int, int));
+
/*
** SMDB_MALLOC_DATABASE -- Allocates a database structure.
**
diff --git a/gnu/usr.sbin/sendmail/libsmdb/smdb1.c b/gnu/usr.sbin/sendmail/libsmdb/smdb1.c
index 8aa924c8756..8e158c4e11d 100644
--- a/gnu/usr.sbin/sendmail/libsmdb/smdb1.c
+++ b/gnu/usr.sbin/sendmail/libsmdb/smdb1.c
@@ -8,7 +8,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: smdb1.c,v 8.58 2002/05/24 23:09:11 gshapiro Exp $")
+SM_RCSID("@(#)$Sendmail: smdb1.c,v 8.59 2004/08/03 20:58:39 ca Exp $")
#include <unistd.h>
#include <stdlib.h>
@@ -35,6 +35,24 @@ struct smdb_db1_cursor
};
typedef struct smdb_db1_cursor SMDB_DB1_CURSOR;
+static DBTYPE smdb_type_to_db1_type __P((SMDB_DBTYPE));
+static unsigned int smdb_put_flags_to_db1_flags __P((SMDB_FLAG));
+static int smdb_cursor_get_flags_to_smdb1 __P((SMDB_FLAG));
+static SMDB_DB1_DATABASE *smdb1_malloc_database __P((void));
+static int smdb1_close __P((SMDB_DATABASE *));
+static int smdb1_del __P((SMDB_DATABASE *, SMDB_DBENT *, unsigned int));
+static int smdb1_fd __P((SMDB_DATABASE *, int *));
+static int smdb1_lockfd __P((SMDB_DATABASE *));
+static int smdb1_get __P((SMDB_DATABASE *, SMDB_DBENT *, SMDB_DBENT *, unsigned int));
+static int smdb1_put __P((SMDB_DATABASE *, SMDB_DBENT *, SMDB_DBENT *, unsigned int));
+static int smdb1_set_owner __P((SMDB_DATABASE *, uid_t, gid_t));
+static int smdb1_sync __P((SMDB_DATABASE *, unsigned int));
+static int smdb1_cursor_close __P((SMDB_CURSOR *));
+static int smdb1_cursor_del __P((SMDB_CURSOR *, unsigned int));
+static int smdb1_cursor_get __P((SMDB_CURSOR *, SMDB_DBENT *, SMDB_DBENT *, SMDB_FLAG));
+static int smdb1_cursor_put __P((SMDB_CURSOR *, SMDB_DBENT *, SMDB_DBENT *, SMDB_FLAG));
+static int smdb1_cursor __P((SMDB_DATABASE *, SMDB_CURSOR **, unsigned int));
+
/*
** SMDB_TYPE_TO_DB1_TYPE -- Translates smdb database type to db1 type.
**
@@ -47,7 +65,7 @@ typedef struct smdb_db1_cursor SMDB_DB1_CURSOR;
**
*/
-DBTYPE
+static DBTYPE
smdb_type_to_db1_type(type)
SMDB_DBTYPE type;
{
@@ -77,7 +95,7 @@ smdb_type_to_db1_type(type)
**
*/
-unsigned int
+static unsigned int
smdb_put_flags_to_db1_flags(flags)
SMDB_FLAG flags;
{
@@ -104,7 +122,7 @@ smdb_put_flags_to_db1_flags(flags)
**
*/
-int
+static int
smdb_cursor_get_flags_to_smdb1(flags)
SMDB_FLAG flags;
{
@@ -131,7 +149,7 @@ smdb_cursor_get_flags_to_smdb1(flags)
** The rest of these functions correspond to the interface laid out in smdb.h.
*/
-SMDB_DB1_DATABASE *
+static SMDB_DB1_DATABASE *
smdb1_malloc_database()
{
SMDB_DB1_DATABASE *db1;
@@ -147,7 +165,7 @@ smdb1_malloc_database()
return db1;
}
-int
+static int
smdb1_close(database)
SMDB_DATABASE *database;
{
@@ -165,7 +183,7 @@ smdb1_close(database)
return result;
}
-int
+static int
smdb1_del(database, key, flags)
SMDB_DATABASE *database;
SMDB_DBENT *key;
@@ -180,7 +198,7 @@ smdb1_del(database, key, flags)
return db->del(db, &dbkey, flags);
}
-int
+static int
smdb1_fd(database, fd)
SMDB_DATABASE *database;
int *fd;
@@ -194,7 +212,7 @@ smdb1_fd(database, fd)
return SMDBE_OK;
}
-int
+static int
smdb1_lockfd(database)
SMDB_DATABASE *database;
{
@@ -204,7 +222,7 @@ smdb1_lockfd(database)
}
-int
+static int
smdb1_get(database, key, data, flags)
SMDB_DATABASE *database;
SMDB_DBENT *key;
@@ -232,7 +250,7 @@ smdb1_get(database, key, data, flags)
return SMDBE_OK;
}
-int
+static int
smdb1_put(database, key, data, flags)
SMDB_DATABASE *database;
SMDB_DBENT *key;
@@ -253,7 +271,7 @@ smdb1_put(database, key, data, flags)
smdb_put_flags_to_db1_flags(flags));
}
-int
+static int
smdb1_set_owner(database, uid, gid)
SMDB_DATABASE *database;
uid_t uid;
@@ -276,7 +294,7 @@ smdb1_set_owner(database, uid, gid)
return SMDBE_OK;
}
-int
+static int
smdb1_sync(database, flags)
SMDB_DATABASE *database;
unsigned int flags;
@@ -286,7 +304,7 @@ smdb1_sync(database, flags)
return db->sync(db, flags);
}
-int
+static int
smdb1_cursor_close(cursor)
SMDB_CURSOR *cursor;
{
@@ -302,7 +320,7 @@ smdb1_cursor_close(cursor)
return SMDBE_OK;
}
-int
+static int
smdb1_cursor_del(cursor, flags)
SMDB_CURSOR *cursor;
unsigned int flags;
@@ -314,7 +332,7 @@ smdb1_cursor_del(cursor, flags)
return db->del(db, NULL, R_CURSOR);
}
-int
+static int
smdb1_cursor_get(cursor, key, value, flags)
SMDB_CURSOR *cursor;
SMDB_DBENT *key;
@@ -344,7 +362,7 @@ smdb1_cursor_get(cursor, key, value, flags)
return SMDBE_OK;
}
-int
+static int
smdb1_cursor_put(cursor, key, value, flags)
SMDB_CURSOR *cursor;
SMDB_DBENT *key;
@@ -366,7 +384,7 @@ smdb1_cursor_put(cursor, key, value, flags)
return db->put(db, &dbkey, &dbdata, R_CURSOR);
}
-int
+static int
smdb1_cursor(database, cursor, flags)
SMDB_DATABASE *database;
SMDB_CURSOR **cursor;
diff --git a/gnu/usr.sbin/sendmail/libsmutil/safefile.c b/gnu/usr.sbin/sendmail/libsmutil/safefile.c
index 8488c187019..868155fb755 100644
--- a/gnu/usr.sbin/sendmail/libsmutil/safefile.c
+++ b/gnu/usr.sbin/sendmail/libsmutil/safefile.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2004 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/io.h>
#include <sm/errstring.h>
-SM_RCSID("@(#)$Sendmail: safefile.c,v 8.127 2004/05/27 22:37:51 msk Exp $")
+SM_RCSID("@(#)$Sendmail: safefile.c,v 8.128 2004/09/30 18:15:49 ca Exp $")
/*
@@ -489,6 +489,7 @@ safedirpath(fn, uid, gid, user, flags, level, offset)
int linklen;
char *target;
char buf[MAXPATHLEN];
+ char fullbuf[MAXLINKPATHLEN];
memset(buf, '\0', sizeof buf);
linklen = readlink(s, buf, sizeof buf);
@@ -544,7 +545,6 @@ safedirpath(fn, uid, gid, user, flags, level, offset)
else
{
char *sptr;
- char fullbuf[MAXLINKPATHLEN];
sptr = strrchr(s, '/');
if (sptr != NULL)
diff --git a/gnu/usr.sbin/sendmail/mail.local/mail.local.c b/gnu/usr.sbin/sendmail/mail.local/mail.local.c
index fa0d4e3907b..01bb10514cb 100644
--- a/gnu/usr.sbin/sendmail/mail.local/mail.local.c
+++ b/gnu/usr.sbin/sendmail/mail.local/mail.local.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1990, 1993, 1994
* The Regents of the University of California. All rights reserved.
@@ -13,12 +13,12 @@
#include <sm/gen.h>
SM_IDSTR(copyright,
-"@(#) Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.\n\
+"@(#) Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.\n\
All rights reserved.\n\
Copyright (c) 1990, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n")
-SM_IDSTR(id, "@(#)$Sendmail: mail.local.c,v 8.251 2003/11/03 18:38:29 ca Exp $")
+SM_IDSTR(id, "@(#)$Sendmail: mail.local.c,v 8.253 2004/11/01 20:42:42 ca Exp $")
#include <stdlib.h>
#include <sm/errstring.h>
@@ -144,6 +144,7 @@ int ExitVal = EX_OK; /* sysexits.h error value. */
bool HoldErrs = false; /* Hold errors in ErrBuf */
bool LMTPMode = false;
bool BounceQuota = false; /* permanent error when over quota */
+bool CloseMBDB = false;
char *HomeMailFile = NULL; /* store mail in homedir */
#if HASHSPOOL
@@ -155,6 +156,9 @@ bool StripRcptDomain = true;
#endif /* HASHSPOOL */
char SpoolPath[MAXPATHLEN];
+char *parseaddr __P((char *, bool));
+char *process_recipient __P((char *));
+void dolmtp __P((void));
void deliver __P((int, char *));
int e_to_sys __P((int));
void notifybiff __P((char *));
@@ -169,6 +173,18 @@ const char *hashname __P((char *));
#endif /* HASHSPOOL */
+static void
+sm_exit(status)
+ int status;
+{
+ if (CloseMBDB)
+ {
+ sm_mbdb_terminate();
+ CloseMBDB = false; /* not really necessary, but ... */
+ }
+ exit(status);
+}
+
int
main(argc, argv)
int argc;
@@ -198,11 +214,13 @@ main(argc, argv)
# endif /* LOG_MAIL */
from = NULL;
+
+ /* XXX can this be converted to a compile time check? */
if (sm_strlcpy(SpoolPath, _PATH_MAILDIR, sizeof(SpoolPath)) >=
sizeof(SpoolPath))
{
mailerr("421", "Configuration error: _PATH_MAILDIR too large");
- exit(EX_CONFIG);
+ sm_exit(EX_CONFIG);
}
#if HASHSPOOL
while ((ch = getopt(argc, argv, "7bdD:f:h:r:lH:p:n")) != -1)
@@ -328,22 +346,21 @@ main(argc, argv)
mailerr(errcode, "Can not open mailbox database %s: %s",
mbdbname, sm_strexit(err));
- exit(err);
+ sm_exit(err);
}
+ CloseMBDB = true;
if (LMTPMode)
{
- extern void dolmtp __P((void));
-
if (argc > 0)
{
mailerr("421", "Users should not be specified in command line if LMTP required");
- exit(EX_TEMPFAIL);
+ sm_exit(EX_TEMPFAIL);
}
dolmtp();
/* NOTREACHED */
- exit(EX_OK);
+ sm_exit(EX_OK);
}
/* Non-LMTP from here on out */
@@ -378,11 +395,11 @@ main(argc, argv)
if (fd < 0)
{
flush_error();
- exit(ExitVal);
+ sm_exit(ExitVal);
}
for (; *argv != NULL; ++argv)
deliver(fd, *argv);
- exit(ExitVal);
+ sm_exit(ExitVal);
/* NOTREACHED */
return ExitVal;
}
@@ -472,7 +489,7 @@ parseaddr(s, rcpt)
if (p == NULL)
{
mailerr("421 4.3.0", "Memory exhausted");
- exit(EX_TEMPFAIL);
+ sm_exit(EX_TEMPFAIL);
}
(void) sm_strlcpy(p, s, l);
@@ -528,7 +545,7 @@ dolmtp()
{
(void) fflush(stdout);
if (fgets(buf, sizeof(buf) - 1, stdin) == NULL)
- exit(EX_OK);
+ sm_exit(EX_OK);
p = buf + strlen(buf) - 1;
if (p >= buf && *p == '\n')
*p-- = '\0';
@@ -642,7 +659,7 @@ dolmtp()
if (sm_strcasecmp(buf, "quit") == 0)
{
printf("221 2.0.0 Bye\r\n");
- exit(EX_OK);
+ sm_exit(EX_OK);
}
goto syntaxerr;
/* NOTREACHED */
@@ -669,7 +686,7 @@ dolmtp()
{
mailerr("421 4.3.0",
"Memory exhausted");
- exit(EX_TEMPFAIL);
+ sm_exit(EX_TEMPFAIL);
}
}
if (sm_strncasecmp(buf + 5, "to:", 3) != 0 ||
@@ -888,7 +905,7 @@ store(from, inbody)
if (LMTPMode)
{
/* Got a premature EOF -- toss message and exit */
- exit(EX_OK);
+ sm_exit(EX_OK);
}
/* If message not newline terminated, need an extra. */
@@ -1548,7 +1565,7 @@ usage()
{
ExitVal = EX_USAGE;
mailerr(NULL, "usage: mail.local [-7] [-b] [-d] [-l] [-f from|-r from] [-h filename] user ...");
- exit(ExitVal);
+ sm_exit(ExitVal);
}
void
diff --git a/gnu/usr.sbin/sendmail/makemap/makemap.c b/gnu/usr.sbin/sendmail/makemap/makemap.c
index 9e60b4b6f56..7098b5a3a05 100644
--- a/gnu/usr.sbin/sendmail/makemap/makemap.c
+++ b/gnu/usr.sbin/sendmail/makemap/makemap.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2002, 2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1992 Eric P. Allman. All rights reserved.
* Copyright (c) 1992, 1993
@@ -14,13 +14,13 @@
#include <sm/gen.h>
SM_IDSTR(copyright,
-"@(#) Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.\n\
+"@(#) Copyright (c) 1998-2002, 2004 Sendmail, Inc. and its suppliers.\n\
All rights reserved.\n\
Copyright (c) 1992 Eric P. Allman. All rights reserved.\n\
Copyright (c) 1992, 1993\n\
The Regents of the University of California. All rights reserved.\n")
-SM_IDSTR(id, "@(#)$Sendmail: makemap.c,v 8.176 2002/06/27 23:41:04 gshapiro Exp $")
+SM_IDSTR(id, "@(#)$Sendmail: makemap.c,v 8.177 2004/08/03 23:57:24 ca Exp $")
#include <sys/types.h>
@@ -52,6 +52,8 @@ BITMAP256 DontBlameSendmail;
#define BUFSIZE 1024
#define ISSEP(c) (sep == '\0' ? isascii(c) && isspace(c) : (c) == sep)
+static void usage __P((char *));
+
static void
usage(progname)
char *progname;
diff --git a/gnu/usr.sbin/sendmail/sendmail/README b/gnu/usr.sbin/sendmail/sendmail/README
index d30964d77c9..749ed134021 100644
--- a/gnu/usr.sbin/sendmail/sendmail/README
+++ b/gnu/usr.sbin/sendmail/sendmail/README
@@ -9,7 +9,7 @@
# the sendmail distribution.
#
#
-# $Sendmail: README,v 8.384 2004/07/26 18:03:55 ca Exp $
+# $Sendmail: README,v 8.385 2004/11/25 06:52:06 msk Exp $
#
This directory contains the source files for sendmail(TM).
@@ -624,7 +624,7 @@ STARTTLS Enables SMTP STARTTLS (RFC 2487). This requires OpenSSL
TLS_NO_RSA Turn off support for RSA algorithms in STARTTLS.
MILTER Turn on support for external filters using the Milter API;
this option is set by default, to turn it off use
- APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER')
+ APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER=0')
in devtools/Site/site.config.m4 (see devtools/README).
See libmilter/README for more information about milter.
REQUIRES_DIR_FSYNC Turn on support for file systems that require to
@@ -1823,4 +1823,4 @@ util.c Some general purpose routines used by sendmail.
version.c The version number and information about this
version of sendmail.
-(Version $Revision: 1.21 $, last update $Date: 2004/09/18 04:08:34 $ )
+(Version $Revision: 1.22 $, last update $Date: 2004/12/16 00:21:30 $ )
diff --git a/gnu/usr.sbin/sendmail/sendmail/bf.c b/gnu/usr.sbin/sendmail/sendmail/bf.c
index 3ed94eab4fb..cc84f80cf49 100644
--- a/gnu/usr.sbin/sendmail/sendmail/bf.c
+++ b/gnu/usr.sbin/sendmail/sendmail/bf.c
@@ -18,7 +18,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: bf.c,v 8.60 2004/04/14 18:12:49 ca Exp $")
+SM_RCSID("@(#)$Sendmail: bf.c,v 8.61 2004/08/03 23:59:02 ca Exp $")
#include <sys/types.h>
#include <sys/stat.h>
@@ -38,6 +38,8 @@ static ssize_t sm_bfread __P((SM_FILE_T *, char *, size_t));
static ssize_t sm_bfwrite __P((SM_FILE_T *, const char *, size_t));
static off_t sm_bfseek __P((SM_FILE_T *, off_t, int));
static int sm_bfclose __P((SM_FILE_T *));
+static int sm_bfcommit __P((SM_FILE_T *));
+static int sm_bftruncate __P((SM_FILE_T *));
static int sm_bfopen __P((SM_FILE_T *, const void *, int, const void *));
static int sm_bfsetinfo __P((SM_FILE_T *, int , void *));
diff --git a/gnu/usr.sbin/sendmail/sendmail/collect.c b/gnu/usr.sbin/sendmail/sendmail/collect.c
index df39cc1236e..f62471a11aa 100644
--- a/gnu/usr.sbin/sendmail/sendmail/collect.c
+++ b/gnu/usr.sbin/sendmail/sendmail/collect.c
@@ -13,9 +13,9 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Sendmail: collect.c,v 8.254 2004/04/05 18:41:38 ca Exp $")
+SM_RCSID("@(#)$Sendmail: collect.c,v 8.260 2004/11/30 23:29:15 ca Exp $")
-static void collecttimeout __P((time_t));
+static void collecttimeout __P((int));
static void eatfrom __P((char *volatile, ENVELOPE *));
static void collect_doheader __P((ENVELOPE *));
static SM_FILE_T *collect_dfopen __P((ENVELOPE *));
@@ -290,7 +290,7 @@ collect(fp, smtpmode, hdrp, e, rsetsize)
{
register SM_FILE_T *volatile df;
volatile bool ignrdot;
- volatile time_t dbto;
+ volatile int dbto;
register char *volatile bp;
volatile int c;
volatile bool inputerr;
@@ -308,7 +308,7 @@ collect(fp, smtpmode, hdrp, e, rsetsize)
df = NULL;
ignrdot = smtpmode ? false : IgnrDot;
- dbto = smtpmode ? TimeOuts.to_datablock : 0;
+ dbto = smtpmode ? (int) TimeOuts.to_datablock : 0;
c = SM_IO_EOF;
inputerr = false;
headeronly = hdrp != NULL;
@@ -525,14 +525,13 @@ bufferchar:
continue;
}
+ SM_ASSERT(mstate == MS_UFROM || mstate == MS_HEADER);
+
/* header -- buffer up */
if (bp >= &buf[buflen - 2])
{
char *obuf;
- if (mstate != MS_HEADER)
- break;
-
/* out of space for header */
obuf = buf;
if (buflen < MEMCHUNKSIZE)
@@ -909,7 +908,7 @@ readerr:
static void
collecttimeout(timeout)
- time_t timeout;
+ int timeout;
{
int save_errno = errno;
diff --git a/gnu/usr.sbin/sendmail/sendmail/conf.c b/gnu/usr.sbin/sendmail/sendmail/conf.c
index 09305d63896..b2caf2a8bc1 100644
--- a/gnu/usr.sbin/sendmail/sendmail/conf.c
+++ b/gnu/usr.sbin/sendmail/sendmail/conf.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Sendmail: conf.c,v 8.1047 2004/07/14 21:54:23 ca Exp $")
+SM_RCSID("@(#)$Sendmail: conf.c,v 8.1051 2004/10/06 21:36:06 ca Exp $")
#include <sendmail/pathnames.h>
#if NEWDB
@@ -35,6 +35,12 @@ static void setupmaps __P((void));
static void setupmailers __P((void));
static void setupqueues __P((void));
static int get_num_procs_online __P((void));
+static int add_hostnames __P((SOCKADDR *));
+
+#if NETINET6 && NEEDSGETIPNODE
+static struct hostent *getipnodebyname __P((char *, int, int, int *));
+static struct hostent *getipnodebyaddr __P((char *, int, int, int *));
+#endif /* NETINET6 && NEEDSGETIPNODE */
/*
@@ -144,6 +150,9 @@ struct prival PrivacyValues[] =
{ "noreceipts", PRIV_NORECEIPTS },
{ "nobodyreturn", PRIV_NOBODYRETN },
{ "goaway", PRIV_GOAWAY },
+#if _FFR_PRIV_NOACTUALRECIPIENT
+ { "noactualrecipient", PRIV_NOACTUALRECIPIENT },
+#endif /* _FFR_PRIV_NOACTUALRECIPIENT */
{ NULL, 0 }
};
@@ -6132,7 +6141,7 @@ char *FFRCompileOptions[] =
** Gurusamy Sarathy of ActiveState
*/
- "_FFR_MAXDATASIZE"
+ "_FFR_MAXDATASIZE",
#endif /* _FFR_MAXDATASIZE */
#if _FFR_MAX_FORWARD_ENTRIES
/* Try to limit number of .forward entries */
@@ -6167,6 +6176,15 @@ char *FFRCompileOptions[] =
/* Disable PIPELINING, delay client if used. */
"_FFR_NO_PIPE",
#endif /* _FFR_NO_PIPE */
+#if _FFR_PRIV_NOACTUALRECIPIENT
+ /*
+ ** PrivacyOptions=noactualrecipient stops sendmail from putting
+ ** X-Actual-Recipient lines in DSNs revealing the actual
+ ** account that addresses map to. Patch from Dan Harkless.
+ */
+
+ "_FFR_PRIV_NOACTUALRECIPIENT"
+#endif /* _FFR_PRIV_NOACTUALRECIPIENT */
#if _FFR_QUEUEDELAY
/* Exponential queue delay; disabled in 8.13 since it isn't used. */
"_FFR_QUEUEDELAY",
@@ -6215,7 +6233,7 @@ char *FFRCompileOptions[] =
#endif /* _FFR_SHM_STATUS */
#if _FFR_SKIP_DOMAINS
/* process every N'th domain instead of every N'th message */
- "_FFR_SKIP_DOMAINS"
+ "_FFR_SKIP_DOMAINS",
#endif /* _FFR_SKIP_DOMAINS */
#if _FFR_SLEEP_USE_SELECT
/* Use select(2) in libsm/clock.c to emulate sleep(2) */
diff --git a/gnu/usr.sbin/sendmail/sendmail/control.c b/gnu/usr.sbin/sendmail/sendmail/control.c
index dea7c5f592f..9ee40133893 100644
--- a/gnu/usr.sbin/sendmail/sendmail/control.c
+++ b/gnu/usr.sbin/sendmail/sendmail/control.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2004 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("@(#)$Sendmail: control.c,v 8.125 2003/06/24 17:46:06 ca Exp $")
+SM_RCSID("@(#)$Sendmail: control.c,v 8.126 2004/08/04 20:54:00 ca Exp $")
#include <sm/fdset.h>
@@ -46,6 +46,7 @@ static struct cmd CmdTab[] =
+static void controltimeout __P((int));
int ControlSocket = -1;
/*
@@ -247,7 +248,7 @@ static jmp_buf CtxControlTimeout;
/* ARGSUSED0 */
static void
controltimeout(timeout)
- time_t timeout;
+ int timeout;
{
/*
** NOTE: THIS CAN BE CALLED FROM A SIGNAL HANDLER. DO NOT ADD
diff --git a/gnu/usr.sbin/sendmail/sendmail/daemon.c b/gnu/usr.sbin/sendmail/sendmail/daemon.c
index 782ce114d54..b1ac41e4ec0 100644
--- a/gnu/usr.sbin/sendmail/sendmail/daemon.c
+++ b/gnu/usr.sbin/sendmail/sendmail/daemon.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Sendmail: daemon.c,v 8.649 2004/07/14 21:57:52 ca Exp $")
+SM_RCSID("@(#)$Sendmail: daemon.c,v 8.653 2004/11/18 23:45:01 ca Exp $")
#if defined(SOCK_STREAM) || defined(__GNU_LIBRARY__)
# define USE_SOCK_STREAM 1
@@ -81,10 +81,15 @@ struct daemon
typedef struct daemon DAEMON_T;
-static void connecttimeout __P((void));
+static void connecttimeout __P((int));
static int opendaemonsocket __P((DAEMON_T *, bool));
static unsigned short setupdaemon __P((SOCKADDR *));
static void getrequests_checkdiskspace __P((ENVELOPE *e));
+static void setsockaddroptions __P((char *, DAEMON_T *));
+static void printdaemonflags __P((DAEMON_T *));
+static int addr_family __P((char *));
+static int addrcmp __P((struct hostent *, char *, SOCKADDR *));
+static void authtimeout __P((int));
/*
** DAEMON.C -- routines to use when running as a daemon.
@@ -1414,7 +1419,7 @@ chkdaemonmodifiers(flag)
static void
setsockaddroptions(p, d)
- register char *p;
+ char *p;
DAEMON_T *d;
{
#if NETISO
@@ -2571,6 +2576,8 @@ gothostent:
break;
#endif /* NETINET6 */
}
+ if (tTd(16, 1))
+ sm_dprintf("Connecting to [%s]...\n", anynet_ntoa(&addr));
i = connect(s, (struct sockaddr *) &addr, addrlen);
save_errno = errno;
if (ev != NULL)
@@ -2774,7 +2781,8 @@ nextaddr:
}
static void
-connecttimeout()
+connecttimeout(ignore)
+ int ignore;
{
/*
** NOTE: THIS CAN BE CALLED FROM A SIGNAL HANDLER. DO NOT ADD
@@ -3257,7 +3265,8 @@ addrcmp(hp, ha, sa)
static jmp_buf CtxAuthTimeout;
static void
-authtimeout()
+authtimeout(ignore)
+ int ignore;
{
/*
** NOTE: THIS CAN BE CALLED FROM A SIGNAL HANDLER. DO NOT ADD
diff --git a/gnu/usr.sbin/sendmail/sendmail/deliver.c b/gnu/usr.sbin/sendmail/sendmail/deliver.c
index c9d7b4a4d52..bb892b66a01 100644
--- a/gnu/usr.sbin/sendmail/sendmail/deliver.c
+++ b/gnu/usr.sbin/sendmail/sendmail/deliver.c
@@ -14,7 +14,7 @@
#include <sendmail.h>
#include <sys/time.h>
-SM_RCSID("@(#)$Sendmail: deliver.c,v 8.976 2004/07/23 20:45:01 gshapiro Exp $")
+SM_RCSID("@(#)$Sendmail: deliver.c,v 8.981 2004/09/30 18:28:32 ca Exp $")
#if HASSETUSERCONTEXT
# include <login_cap.h>
@@ -28,10 +28,10 @@ SM_RCSID("@(#)$Sendmail: deliver.c,v 8.976 2004/07/23 20:45:01 gshapiro Exp $")
# include "sfsasl.h"
#endif /* STARTTLS || SASL */
-void markfailure __P((ENVELOPE *, ADDRESS *, MCI *, int, bool));
static int deliver __P((ENVELOPE *, ADDRESS *));
static void dup_queue_file __P((ENVELOPE *, ENVELOPE *, int));
-static void mailfiletimeout __P((void));
+static void mailfiletimeout __P((int));
+static void endwaittimeout __P((int));
static int parse_hostsignature __P((char *, char **, MAILER *));
static void sendenvelope __P((ENVELOPE *, int));
extern MCI *mci_new __P((SM_RPOOL_T *));
@@ -1659,7 +1659,7 @@ deliver(e, firstto)
}
/*
- ** Strip one leading backslash if requested and the
+ ** Strip all leading backslashes if requested and the
** next character is alphanumerical (the latter can
** probably relaxed a bit, see RFC2821).
*/
@@ -2900,6 +2900,17 @@ reconnect: /* after switching to an encrypted connection */
smtpinit(m, mci, e, ONLY_HELO(mci->mci_flags));
CLR_HELO(mci->mci_flags);
+ /*
+ ** If a cached connection gave a 421 reply to the
+ ** RSET, the connection will be closed by now.
+ */
+
+ if (mci->mci_state == MCIS_CLOSED)
+ {
+ rcode = EX_TEMPFAIL;
+ goto give_up;
+ }
+
if (IS_DLVR_RETURN(e))
{
/*
@@ -3769,7 +3780,8 @@ markfailure(e, q, mci, rcode, ovr)
static jmp_buf EndWaitTimeout;
static void
-endwaittimeout()
+endwaittimeout(ignore)
+ int ignore;
{
/*
** NOTE: THIS CAN BE CALLED FROM A SIGNAL HANDLER. DO NOT ADD
@@ -4001,7 +4013,7 @@ giveresponse(status, dsn, m, mci, ctladdr, xstart, e, to)
#ifdef EHOSTUNREACH
case EHOSTUNREACH: /* No route to host */
#endif /* EHOSTUNREACH */
- if (mci->mci_host != NULL)
+ if (mci != NULL && mci->mci_host != NULL)
{
(void) sm_strlcpyn(bp,
SPACELEFT(buf, bp),
@@ -5601,7 +5613,8 @@ mailfile(filename, mailer, ctladdr, sfflags, e)
}
static void
-mailfiletimeout()
+mailfiletimeout(ignore)
+ int ignore;
{
/*
** NOTE: THIS CAN BE CALLED FROM A SIGNAL HANDLER. DO NOT ADD
diff --git a/gnu/usr.sbin/sendmail/sendmail/domain.c b/gnu/usr.sbin/sendmail/sendmail/domain.c
index a0fc43c72b1..1e4abb07751 100644
--- a/gnu/usr.sbin/sendmail/sendmail/domain.c
+++ b/gnu/usr.sbin/sendmail/sendmail/domain.c
@@ -14,9 +14,9 @@
#include <sendmail.h>
#if NAMED_BIND
-SM_RCSID("@(#)$Sendmail: domain.c,v 8.194 2004/01/14 01:47:34 ca Exp $ (with name server)")
+SM_RCSID("@(#)$Sendmail: domain.c,v 8.195 2004/08/04 21:11:31 ca Exp $ (with name server)")
#else /* NAMED_BIND */
-SM_RCSID("@(#)$Sendmail: domain.c,v 8.194 2004/01/14 01:47:34 ca Exp $ (without name server)")
+SM_RCSID("@(#)$Sendmail: domain.c,v 8.195 2004/08/04 21:11:31 ca Exp $ (without name server)")
#endif /* NAMED_BIND */
#if NAMED_BIND
@@ -223,7 +223,7 @@ getmxrr(host, mxhosts, mxprefs, droplocalhost, rcode, tryfallback, pttl)
char *fallbackMX = FallbackMX;
bool trycanon = false;
unsigned short *prefs;
- int (*resfunc)();
+ int (*resfunc) __P((const char *, int, int, u_char *, int));
unsigned short prefer[MAXMXHOSTS];
int weight[MAXMXHOSTS];
int ttl = 0;
diff --git a/gnu/usr.sbin/sendmail/sendmail/headers.c b/gnu/usr.sbin/sendmail/sendmail/headers.c
index 96b3b2ce269..5cc32efd240 100644
--- a/gnu/usr.sbin/sendmail/sendmail/headers.c
+++ b/gnu/usr.sbin/sendmail/sendmail/headers.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Sendmail: headers.c,v 8.286 2004/07/08 17:57:32 ca Exp $")
+SM_RCSID("@(#)$Sendmail: headers.c,v 8.287 2004/12/03 18:29:51 ca Exp $")
static HDR *allocheader __P((char *, char *, int, SM_RPOOL_T *));
static size_t fix_mime_header __P((HDR *, ENVELOPE *));
@@ -1811,7 +1811,7 @@ put_vanilla_header(h, v, mci)
register char *nlp;
register char *obp;
int putflags;
- char obuf[MAXLINE];
+ char obuf[MAXLINE + 256]; /* additional length for h_field */
putflags = PXLF_HEADER;
if (bitnset(M_7BITHDRS, mci->mci_mailer->m_flags))
diff --git a/gnu/usr.sbin/sendmail/sendmail/helpfile b/gnu/usr.sbin/sendmail/sendmail/helpfile
index 80dd8873d31..badbb55796d 100644
--- a/gnu/usr.sbin/sendmail/sendmail/helpfile
+++ b/gnu/usr.sbin/sendmail/sendmail/helpfile
@@ -1,6 +1,6 @@
#vers 2
cpyr
-cpyr Copyright (c) 1998-2000, 2002 Sendmail, Inc. and its suppliers.
+cpyr Copyright (c) 1998-2000, 2002, 2004 Sendmail, Inc. and its suppliers.
cpyr All rights reserved.
cpyr Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
cpyr Copyright (c) 1988, 1993
@@ -11,7 +11,7 @@ cpyr By using this file, you agree to the terms and conditions set
cpyr forth in the LICENSE file which can be found at the top level of
cpyr the sendmail distribution.
cpyr
-cpyr $$Sendmail: helpfile,v 8.40 2002/03/19 00:23:28 gshapiro Exp $$
+cpyr $$Sendmail: helpfile,v 8.43 2004/10/29 18:05:39 ca Exp $$
cpyr
smtp This is sendmail version $v
smtp Topics:
diff --git a/gnu/usr.sbin/sendmail/sendmail/map.c b/gnu/usr.sbin/sendmail/sendmail/map.c
index 3a9b67a9d6f..48d50258c47 100644
--- a/gnu/usr.sbin/sendmail/sendmail/map.c
+++ b/gnu/usr.sbin/sendmail/sendmail/map.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Sendmail: map.c,v 8.664 2004/06/28 17:46:13 ca Exp $")
+SM_RCSID("@(#)$Sendmail: map.c,v 8.666 2004/08/17 16:50:19 gshapiro Exp $")
#if LDAPMAP
# include <sm/ldap.h>
@@ -4431,7 +4431,10 @@ ldapmap_parseargs(map, args)
}
}
lmap->ldap_attr[i] = NULL;
+
+ /* Set in case needed in future code */
attrssetup = true;
+
if (recurse && !normalseen)
{
syserr("LDAP recursion requested in %s but no returnable attribute given",
@@ -6470,6 +6473,9 @@ struct regex_map
char *regex_delim; /* move to type MAP */
};
+static int parse_fields __P((char *, int *, int, int));
+static char *regex_map_rewrite __P((MAP *, const char*, size_t, char **));
+
static int
parse_fields(s, ibuf, blen, nr_substrings)
char *s;
diff --git a/gnu/usr.sbin/sendmail/sendmail/mci.c b/gnu/usr.sbin/sendmail/sendmail/mci.c
index 8c82fac1f62..fe71005ae04 100644
--- a/gnu/usr.sbin/sendmail/sendmail/mci.c
+++ b/gnu/usr.sbin/sendmail/sendmail/mci.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Sendmail: mci.c,v 8.211 2003/03/31 17:35:50 ca Exp $")
+SM_RCSID("@(#)$Sendmail: mci.c,v 8.212 2004/08/04 21:11:31 ca Exp $")
#if NETINET || NETINET6
# include <arpa/inet.h>
@@ -1045,7 +1045,7 @@ mci_store_persistent(mci)
int
mci_traverse_persistent(action, pathname)
- int (*action)();
+ int (*action)__P((char *, char *));
char *pathname;
{
struct stat statbuf;
diff --git a/gnu/usr.sbin/sendmail/sendmail/milter.c b/gnu/usr.sbin/sendmail/sendmail/milter.c
index cf8eea5ff96..cb3a81e0a37 100644
--- a/gnu/usr.sbin/sendmail/sendmail/milter.c
+++ b/gnu/usr.sbin/sendmail/sendmail/milter.c
@@ -10,7 +10,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Sendmail: milter.c,v 8.225 2004/07/08 21:52:20 ca Exp $")
+SM_RCSID("@(#)$Sendmail: milter.c,v 8.228 2004/11/09 18:54:55 ca Exp $")
#if MILTER
# include <libmilter/mfapi.h>
@@ -29,7 +29,7 @@ SM_RCSID("@(#)$Sendmail: milter.c,v 8.225 2004/07/08 21:52:20 ca Exp $")
# include <sm/fdset.h>
-static void milter_connect_timeout __P((void));
+static void milter_connect_timeout __P((int));
static void milter_error __P((struct milter *, ENVELOPE *));
static int milter_open __P((struct milter *, bool, ENVELOPE *));
static void milter_parse_timeouts __P((char *, struct milter *));
@@ -75,6 +75,8 @@ static size_t MilterMaxDataSize = MILTER_MAX_DATA_SIZE;
} \
else if (bitnset(SMF_TEMPFAIL, m->mf_flags)) \
*state = SMFIR_TEMPFAIL; \
+ else if (bitnset(SMF_TEMPDROP, m->mf_flags)) \
+ *state = SMFIR_SHUTDOWN; \
else if (bitnset(SMF_REJECT, m->mf_flags)) \
*state = SMFIR_REJECT; \
else \
@@ -1127,7 +1129,8 @@ milter_open(m, parseonly, e)
}
static void
-milter_connect_timeout()
+milter_connect_timeout(ignore)
+ int ignore;
{
/*
** NOTE: THIS CAN BE CALLED FROM A SIGNAL HANDLER. DO NOT ADD
@@ -2340,6 +2343,7 @@ milter_per_connection_check(e)
**
** Parameters:
** m -- the broken filter.
+** e -- current envelope.
**
** Returns:
** none
@@ -2351,10 +2355,8 @@ milter_error(m, e)
ENVELOPE *e;
{
/*
- ** We could send a quit here but
- ** we may have gotten here due to
- ** an I/O error so we don't want
- ** to try to make things worse.
+ ** We could send a quit here but we may have gotten here due to
+ ** an I/O error so we don't want to try to make things worse.
*/
if (m->mf_sock >= 0)
@@ -2832,13 +2834,21 @@ milter_changeheader(response, rlen, e)
if (*val == '\0')
{
if (tTd(64, 10))
- sm_dprintf("Delete (noop) %s:\n", field);
+ sm_dprintf("Delete (noop) %s\n", field);
+ if (MilterLogLevel > 8)
+ sm_syslog(LOG_INFO, e->e_id,
+ "Milter delete (noop): header: %s"
+ , field);
}
else
{
/* treat modify value with no existing header as add */
if (tTd(64, 10))
sm_dprintf("Add %s: %s\n", field, val);
+ if (MilterLogLevel > 8)
+ sm_syslog(LOG_INFO, e->e_id,
+ "Milter change (add): header: %s: %s"
+ , field, val);
addheader(newstr(field), val, H_USER, e);
}
return;
diff --git a/gnu/usr.sbin/sendmail/sendmail/mime.c b/gnu/usr.sbin/sendmail/sendmail/mime.c
index ab8d1892292..ddce97526b1 100644
--- a/gnu/usr.sbin/sendmail/sendmail/mime.c
+++ b/gnu/usr.sbin/sendmail/sendmail/mime.c
@@ -14,7 +14,7 @@
#include <sendmail.h>
#include <string.h>
-SM_RCSID("@(#)$Sendmail: mime.c,v 8.136 2004/03/22 18:21:34 ca Exp $")
+SM_RCSID("@(#)$Sendmail: mime.c,v 8.137 2004/09/02 21:37:26 ca Exp $")
/*
** MIME support.
@@ -848,7 +848,11 @@ mimeboundary(line, boundaries)
i--;
/* strip off trailing whitespace */
- while (i > 0 && (line[i - 1] == ' ' || line[i - 1] == '\t'))
+ while (i > 0 && (line[i - 1] == ' ' || line[i - 1] == '\t'
+#if _FFR_MIME_CR_OK
+ || line[i - 1] == '\r'
+#endif /* _FFR_MIME_CR_OK */
+ ))
i--;
savec = line[i];
line[i] = '\0';
diff --git a/gnu/usr.sbin/sendmail/sendmail/parseaddr.c b/gnu/usr.sbin/sendmail/sendmail/parseaddr.c
index f9aedd64e52..3b581338c1b 100644
--- a/gnu/usr.sbin/sendmail/sendmail/parseaddr.c
+++ b/gnu/usr.sbin/sendmail/sendmail/parseaddr.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Sendmail: parseaddr.c,v 8.378 2004/05/18 20:01:54 ca Exp $")
+SM_RCSID("@(#)$Sendmail: parseaddr.c,v 8.379 2004/08/06 22:19:36 ca Exp $")
static void allocaddr __P((ADDRESS *, int, char *, ENVELOPE *));
static int callsubr __P((char**, int, ENVELOPE *));
@@ -2196,7 +2196,7 @@ cataddr(pvp, evp, buf, sz, spacesub)
/* Don't silently truncate long strings */
if (sz <= 0)
- syserr("cataddr: string too long");
+ usrerr("cataddr: string too long");
*p = '\0';
}
/*
diff --git a/gnu/usr.sbin/sendmail/sendmail/queue.c b/gnu/usr.sbin/sendmail/sendmail/queue.c
index e45f935ff2d..dbdc71a1aeb 100644
--- a/gnu/usr.sbin/sendmail/sendmail/queue.c
+++ b/gnu/usr.sbin/sendmail/sendmail/queue.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Sendmail: queue.c,v 8.938 2004/06/03 19:02:10 ca Exp $")
+SM_RCSID("@(#)$Sendmail: queue.c,v 8.939 2004/08/03 19:57:23 ca Exp $")
#include <dirent.h>
@@ -2399,7 +2399,8 @@ doqueuerun()
*/
void
-runqueueevent()
+runqueueevent(ignore)
+ int ignore;
{
int save_errno = errno;
diff --git a/gnu/usr.sbin/sendmail/sendmail/readcf.c b/gnu/usr.sbin/sendmail/sendmail/readcf.c
index bfe7e43940f..399a422e38a 100644
--- a/gnu/usr.sbin/sendmail/sendmail/readcf.c
+++ b/gnu/usr.sbin/sendmail/sendmail/readcf.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Sendmail: readcf.c,v 8.641 2004/07/23 20:45:02 gshapiro Exp $")
+SM_RCSID("@(#)$Sendmail: readcf.c,v 8.642 2004/08/04 21:17:57 ca Exp $")
#if NETINET || NETINET6
# include <arpa/inet.h>
@@ -29,6 +29,7 @@ static char **makeargv __P((char *));
static void settimeout __P((char *, char *, bool));
static void toomany __P((int, int));
static char *extrquotstr __P((char *, char **, char *, bool *));
+static void parse_class_words __P((int, char *));
/*
** READCF -- read configuration file.
diff --git a/gnu/usr.sbin/sendmail/sendmail/recipient.c b/gnu/usr.sbin/sendmail/sendmail/recipient.c
index db6a4b02f81..f04664fc562 100644
--- a/gnu/usr.sbin/sendmail/sendmail/recipient.c
+++ b/gnu/usr.sbin/sendmail/sendmail/recipient.c
@@ -13,9 +13,9 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Sendmail: recipient.c,v 8.336 2004/07/23 20:45:02 gshapiro Exp $")
+SM_RCSID("@(#)$Sendmail: recipient.c,v 8.337 2004/08/03 19:57:23 ca Exp $")
-static void includetimeout __P((void));
+static void includetimeout __P((int));
static ADDRESS *self_reference __P((ADDRESS *));
static int sortexpensive __P((ADDRESS *, ADDRESS *));
static int sortbysignature __P((ADDRESS *, ADDRESS *));
@@ -1874,7 +1874,8 @@ resetuid:
}
static void
-includetimeout()
+includetimeout(ignore)
+ int ignore;
{
/*
** NOTE: THIS CAN BE CALLED FROM A SIGNAL HANDLER. DO NOT ADD
diff --git a/gnu/usr.sbin/sendmail/sendmail/sasl.c b/gnu/usr.sbin/sendmail/sendmail/sasl.c
index 6469fabc934..264376c3522 100644
--- a/gnu/usr.sbin/sendmail/sendmail/sasl.c
+++ b/gnu/usr.sbin/sendmail/sendmail/sasl.c
@@ -9,7 +9,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: sasl.c,v 8.20 2004/06/02 22:48:06 ca Exp $")
+SM_RCSID("@(#)$Sendmail: sasl.c,v 8.21 2004/11/22 23:09:00 gshapiro Exp $")
#if SASL
# include <stdlib.h>
@@ -226,9 +226,6 @@ intersect(s1, s2, rpool)
# include <arpa/inet.h>
-# ifndef NI_WITHSCOPEID
-# define NI_WITHSCOPEID 0
-# endif
# ifndef NI_MAXHOST
# define NI_MAXHOST 1025
# endif
@@ -244,6 +241,9 @@ iptostring(addr, addrlen, out, outlen)
unsigned outlen;
{
char hbuf[NI_MAXHOST], pbuf[NI_MAXSERV];
+# if NETINET6
+ int niflags;
+# endif /* NETINET6 */
if (addr == NULL || out == NULL)
{
@@ -252,9 +252,13 @@ iptostring(addr, addrlen, out, outlen)
}
# if NETINET6
+ niflags = (NI_NUMERICHOST | NI_NUMERICSERV);
+# ifdef NI_WITHSCOPEID
+ if (addr->sa.sa_family == AF_INET6)
+ niflags |= NI_WITHSCOPEID;
+# endif /* NI_WITHSCOPEID */
if (getnameinfo((struct sockaddr *) addr, addrlen,
- hbuf, sizeof hbuf, pbuf, sizeof pbuf,
- NI_NUMERICHOST | NI_WITHSCOPEID | NI_NUMERICSERV) != 0)
+ hbuf, sizeof hbuf, pbuf, sizeof pbuf, niflags) != 0)
return false;
# else /* NETINET6 */
if (addr->sa.sa_family != AF_INET)
diff --git a/gnu/usr.sbin/sendmail/sendmail/savemail.c b/gnu/usr.sbin/sendmail/sendmail/savemail.c
index 5b4f3ddbaa2..658713f9e5a 100644
--- a/gnu/usr.sbin/sendmail/sendmail/savemail.c
+++ b/gnu/usr.sbin/sendmail/sendmail/savemail.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Sendmail: savemail.c,v 8.303 2004/01/14 02:56:51 ca Exp $")
+SM_RCSID("@(#)$Sendmail: savemail.c,v 8.304 2004/10/06 21:36:06 ca Exp $")
static void errbody __P((MCI *, ENVELOPE *, char *));
static bool pruneroute __P((char *));
@@ -1182,6 +1182,9 @@ errbody(mci, e, separator)
/* X-Actual-Recipient: -- the real problem address */
if (actual[0] != '\0' &&
q->q_finalrcpt != NULL &&
+#if _FFR_PRIV_NOACTUALRECIPIENT
+ !bitset(PRIV_NOACTUALRECIPIENT, PrivacyFlags) &&
+#endif /* _FFR_PRIV_NOACTUALRECIPIENT */
strcmp(actual, q->q_finalrcpt) != 0)
{
(void) sm_snprintf(buf, sizeof buf,
diff --git a/gnu/usr.sbin/sendmail/sendmail/sendmail.h b/gnu/usr.sbin/sendmail/sendmail/sendmail.h
index 901fb55e46f..18fa9b200c6 100644
--- a/gnu/usr.sbin/sendmail/sendmail/sendmail.h
+++ b/gnu/usr.sbin/sendmail/sendmail/sendmail.h
@@ -52,7 +52,7 @@
#ifdef _DEFINE
# ifndef lint
-SM_UNUSED(static char SmailId[]) = "@(#)$Sendmail: sendmail.h,v 8.984 2004/07/14 21:54:22 ca Exp $";
+SM_UNUSED(static char SmailId[]) = "@(#)$Sendmail: sendmail.h,v 8.990 2004/11/09 19:45:46 ca Exp $";
# endif /* ! lint */
#endif /* _DEFINE */
@@ -400,7 +400,7 @@ struct mailer
#define M_ESMTP 'a' /* run Extended SMTP */
#define M_ALIASABLE 'A' /* user can be LHS of an alias */
#define M_BLANKEND 'b' /* ensure blank line at end of message */
-#define M_STRIPBACKSL 'B' /* strip leading backslash from user */
+#define M_STRIPBACKSL 'B' /* strip all leading backslashes from user */
#define M_NOCOMMENT 'c' /* don't include comment part of address */
#define M_CANONICAL 'C' /* make addresses canonical "u@dom" */
#define M_NOBRACKET 'd' /* never angle bracket envelope route-addrs */
@@ -463,7 +463,7 @@ struct mailer
extern void initerrmailers __P((void));
extern void makemailer __P((char *));
extern void makequeue __P((char *, bool));
-extern void runqueueevent __P((void));
+extern void runqueueevent __P((int));
#if _FFR_QUEUE_RUN_PARANOIA
extern bool checkqueuerunner __P((void));
#endif /* _FFR_QUEUE_RUN_PARANOIA */
@@ -1601,6 +1601,9 @@ extern void set_delivery_mode __P((int, ENVELOPE *));
#define PRIV_NOETRN 0x00080000 /* disallow ETRN command */
#define PRIV_NOBODYRETN 0x00100000 /* do not return bodies on bounces */
#define PRIV_NORECEIPTS 0x00200000 /* disallow return receipts */
+#if _FFR_PRIV_NOACTUALRECIPIENT
+# define PRIV_NOACTUALRECIPIENT 0x00400000 /* no X-Actual-Recipient in DSNs */
+#endif /* _FFR_PRIV_NOACTUALRECIPIENT */
/* don't give no info, anyway, anyhow */
#define PRIV_GOAWAY 0x0000ffff
@@ -1695,6 +1698,7 @@ struct milter
/* MTA flags */
# define SMF_REJECT 'R' /* Reject connection on filter fail */
# define SMF_TEMPFAIL 'T' /* tempfail connection on failure */
+# define SMF_TEMPDROP '4' /* 421 connection on failure */
/* states */
# define SMFS_CLOSED 'C' /* closed for all further actions */
@@ -2350,7 +2354,7 @@ extern void PRINTFLIKE(3, 4) sm_syslog __P((int, const char *, const char *, ...
/* SMTP */
extern void giveresponse __P((int, char *, MAILER *, MCI *, ADDRESS *, time_t, ENVELOPE *, ADDRESS *));
-extern int reply __P((MAILER *, MCI *, ENVELOPE *, time_t, void (*)(), char **, int));
+extern int reply __P((MAILER *, MCI *, ENVELOPE *, time_t, void (*)__P((char *, bool, MAILER *, MCI *, ENVELOPE *)), char **, int));
extern void smtp __P((char *volatile, BITMAP256, ENVELOPE *volatile));
#if SASL
extern int smtpauth __P((MAILER *, MCI *, ENVELOPE *));
@@ -2496,6 +2500,7 @@ extern void makelower __P((char *));
extern int makeconnection_ds __P((char *, MCI *));
extern int makeconnection __P((char *, volatile unsigned int, MCI *, ENVELOPE *, time_t));
extern void makeworkgroups __P((void));
+extern void markfailure __P((ENVELOPE *, ADDRESS *, MCI *, int, bool));
extern void mark_work_group_restart __P((int, int));
extern char * munchstring __P((char *, char **, int));
extern struct hostent *myhostname __P((char *, int));
diff --git a/gnu/usr.sbin/sendmail/sendmail/sfsasl.c b/gnu/usr.sbin/sendmail/sendmail/sfsasl.c
index 0c9d1afa686..4a1f70a23a4 100644
--- a/gnu/usr.sbin/sendmail/sendmail/sfsasl.c
+++ b/gnu/usr.sbin/sendmail/sendmail/sfsasl.c
@@ -9,7 +9,7 @@
*/
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: sfsasl.c,v 8.98 2004/03/03 19:20:31 ca Exp $")
+SM_RCSID("@(#)$Sendmail: sfsasl.c,v 8.100 2004/11/23 18:32:32 ca Exp $")
#include <stdlib.h>
#include <sendmail.h>
#include <errno.h>
@@ -279,10 +279,29 @@ sasl_write(fp, buf, size)
# else /* SASL >= 20000 */
char *outbuf;
# endif /* SASL >= 20000 */
- unsigned int outlen;
+ unsigned int outlen, *maxencode;
size_t ret = 0, total = 0;
struct sasl_obj *so = (struct sasl_obj *) fp->f_cookie;
+ /*
+ ** Fetch the maximum input buffer size for sasl_encode().
+ ** This can be less than the size set in attemptauth()
+ ** due to a negotation with the other side, e.g.,
+ ** Cyrus IMAP lmtp program sets maxbuf=4096,
+ ** digestmd5 substracts 25 and hence we'll get 4071
+ ** instead of 8192 (MAXOUTLEN).
+ ** Hack (for now): simply reduce the size, callers are (must be)
+ ** able to deal with that and invoke sasl_write() again with
+ ** the rest of the data.
+ ** Note: it would be better to store this value in the context
+ ** after the negotiation.
+ */
+
+ result = sasl_getprop(so->conn, SASL_MAXOUTBUF,
+ (const void **) &maxencode);
+ if (result == SASL_OK && size > *maxencode && *maxencode > 0)
+ size = *maxencode;
+
result = sasl_encode(so->conn, buf,
(unsigned int) size, &outbuf, &outlen);
diff --git a/gnu/usr.sbin/sendmail/sendmail/sm_resolve.c b/gnu/usr.sbin/sendmail/sendmail/sm_resolve.c
index 83a501a3e11..f46d13d0a1f 100644
--- a/gnu/usr.sbin/sendmail/sendmail/sm_resolve.c
+++ b/gnu/usr.sbin/sendmail/sendmail/sm_resolve.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2000-2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 2000-2004 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("$Sendmail: sm_resolve.c,v 8.32 2003/03/22 22:57:26 ca Exp $")
+SM_RCSID("$Sendmail: sm_resolve.c,v 8.33 2004/08/04 21:17:57 ca Exp $")
static struct stot
{
@@ -70,6 +70,8 @@ static struct stot
{ NULL, 0 }
};
+static DNS_REPLY_T *parse_dns_reply __P((unsigned char *, int));
+
/*
** DNS_STRING_TO_TYPE -- convert resource record name into type
**
diff --git a/gnu/usr.sbin/sendmail/sendmail/srvrsmtp.c b/gnu/usr.sbin/sendmail/sendmail/srvrsmtp.c
index 05db9bf42a1..fb37c12eef0 100644
--- a/gnu/usr.sbin/sendmail/sendmail/srvrsmtp.c
+++ b/gnu/usr.sbin/sendmail/sendmail/srvrsmtp.c
@@ -17,7 +17,7 @@
# include <libmilter/mfdef.h>
#endif /* MILTER */
-SM_RCSID("@(#)$Sendmail: srvrsmtp.c,v 8.900 2004/07/08 23:29:33 ca Exp $")
+SM_RCSID("@(#)$Sendmail: srvrsmtp.c,v 8.902 2004/11/18 21:46:01 ca Exp $")
#include <sys/time.h>
#include <sm/fdset.h>
@@ -1966,6 +1966,13 @@ tlsfail:
/* only complain if strict check */
ok = AllowBogusHELO;
+
+ /* allow trailing whitespace */
+ while (!ok && *++q != '\0' &&
+ isspace(*q))
+ ;
+ if (*q == '\0')
+ ok = true;
break;
}
if (strchr("[].-_#:", *q) == NULL)
@@ -4110,7 +4117,9 @@ rcpt_esmtp_args(a, kp, vp, e)
return;
for (p = vp; p != NULL; vp = p)
{
- p = strchr(p, ',');
+ char *s;
+
+ s = p = strchr(p, ',');
if (p != NULL)
*p++ = '\0';
if (sm_strcasecmp(vp, "success") == 0)
@@ -4125,6 +4134,8 @@ rcpt_esmtp_args(a, kp, vp, e)
vp);
/* NOTREACHED */
}
+ if (s != NULL)
+ *s = ',';
}
}
else if (sm_strcasecmp(kp, "orcpt") == 0)
diff --git a/gnu/usr.sbin/sendmail/sendmail/tls.c b/gnu/usr.sbin/sendmail/sendmail/tls.c
index a5ab2bc133f..ead9d404ee7 100644
--- a/gnu/usr.sbin/sendmail/sendmail/tls.c
+++ b/gnu/usr.sbin/sendmail/sendmail/tls.c
@@ -10,7 +10,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Sendmail: tls.c,v 8.95 2004/07/13 21:37:33 ca Exp $")
+SM_RCSID("@(#)$Sendmail: tls.c,v 8.96 2004/08/04 21:17:58 ca Exp $")
#if STARTTLS
# include <openssl/err.h>
@@ -39,6 +39,9 @@ static int x509_verify_cb __P((int, X509_STORE_CTX *));
# define CONST097 const
# endif /* !defined() || OPENSSL_VERSION_NUMBER < 0x00907000L */
static void apps_ssl_info_cb __P((CONST097 SSL *, int , int));
+static bool tls_ok_f __P((char *, char *, int));
+static bool tls_safe_f __P((char *, long, bool));
+static int tls_verify_log __P((int, X509_STORE_CTX *, char *));
# if !NO_DH
static DH *get_dh512 __P((void));
diff --git a/gnu/usr.sbin/sendmail/sendmail/usersmtp.c b/gnu/usr.sbin/sendmail/sendmail/usersmtp.c
index 973baabeecd..38abc37b1e5 100644
--- a/gnu/usr.sbin/sendmail/sendmail/usersmtp.c
+++ b/gnu/usr.sbin/sendmail/sendmail/usersmtp.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -13,13 +13,12 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Sendmail: usersmtp.c,v 8.451 2004/03/01 21:50:36 ca Exp $")
+SM_RCSID("@(#)$Sendmail: usersmtp.c,v 8.455 2004/08/12 23:23:19 gshapiro Exp $")
#include <sysexits.h>
-extern void markfailure __P((ENVELOPE *, ADDRESS *, MCI *, int, bool));
-static void datatimeout __P((void));
+static void datatimeout __P((int));
static void esmtp_check __P((char *, bool, MAILER *, MCI *, ENVELOPE *));
static void helo_options __P((char *, bool, MAILER *, MCI *, ENVELOPE *));
static int smtprcptstat __P((ADDRESS *, MAILER *, MCI *, ENVELOPE *));
@@ -2761,7 +2760,8 @@ smtpdata(m, mci, e, ctladdr, xstart)
}
static void
-datatimeout()
+datatimeout(ignore)
+ int ignore;
{
int save_errno = errno;
@@ -2997,10 +2997,12 @@ smtprset(m, mci, e)
** to take when a value other than 250 is received.
**
** However, if 421 is returned for the RSET, leave
- ** mci_state as MCIS_SSD (set in reply()).
+ ** mci_state alone (MCIS_SSD can be set in reply()
+ ** and MCIS_CLOSED can be set in smtpquit() if
+ ** reply() gets a 421 and calls smtpquit()).
*/
- if (mci->mci_state != MCIS_SSD)
+ if (mci->mci_state != MCIS_SSD && mci->mci_state != MCIS_CLOSED)
mci->mci_state = MCIS_OPEN;
}
/*
@@ -3063,7 +3065,7 @@ reply(m, mci, e, timeout, pfunc, enhstat, rtype)
MCI *mci;
ENVELOPE *e;
time_t timeout;
- void (*pfunc)();
+ void (*pfunc) __P((char *, bool, MAILER *, MCI *, ENVELOPE *));
char **enhstat;
int rtype;
{
diff --git a/gnu/usr.sbin/sendmail/sendmail/util.c b/gnu/usr.sbin/sendmail/sendmail/util.c
index 9e9ddc36cfa..2b79cb162ae 100644
--- a/gnu/usr.sbin/sendmail/sendmail/util.c
+++ b/gnu/usr.sbin/sendmail/sendmail/util.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Sendmail: util.c,v 8.382 2004/03/26 19:01:10 ca Exp $")
+SM_RCSID("@(#)$Sendmail: util.c,v 8.383 2004/08/02 18:50:59 ca Exp $")
#include <sysexits.h>
#include <sm/xtrap.h>
@@ -93,7 +93,8 @@ addquotes(s, rpool)
}
/*
-** STRIPBACKSLASH -- Strip leading backslash from a string.
+** STRIPBACKSLASH -- Strip all leading backslashes from a string, provided
+** the following character is alpha-numerical.
**
** This is done in place.
**
diff --git a/gnu/usr.sbin/sendmail/sendmail/version.c b/gnu/usr.sbin/sendmail/sendmail/version.c
index cb09a2b29d4..41357676b1a 100644
--- a/gnu/usr.sbin/sendmail/sendmail/version.c
+++ b/gnu/usr.sbin/sendmail/sendmail/version.c
@@ -13,6 +13,6 @@
#include <sm/gen.h>
-SM_RCSID("@(#)$Sendmail: version.c,v 8.130 2004/07/30 18:03:07 ca Exp $")
+SM_RCSID("@(#)$Sendmail: version.c,v 8.137 2004/12/14 01:58:03 ca Exp $")
-char Version[] = "8.13.1";
+char Version[] = "8.13.2";
diff --git a/gnu/usr.sbin/sendmail/smrsh/smrsh.8 b/gnu/usr.sbin/sendmail/smrsh/smrsh.8
index f29650cc998..790ff20a6b9 100644
--- a/gnu/usr.sbin/sendmail/smrsh/smrsh.8
+++ b/gnu/usr.sbin/sendmail/smrsh/smrsh.8
@@ -1,4 +1,4 @@
-.\" Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.
+.\" Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
.\" All rights reserved.
.\" Copyright (c) 1993 Eric P. Allman. All rights reserved.
.\" Copyright (c) 1993
@@ -9,9 +9,9 @@
.\" the sendmail distribution.
.\"
.\"
-.\" $Sendmail: smrsh.8,v 8.20 2003/10/07 18:05:12 ca Exp $
+.\" $Sendmail: smrsh.8,v 8.22 2004/08/06 03:55:35 gshapiro Exp $
.\"
-.Dd October 7, 2003
+.Dd August 8, 2004
.Dt SMRSH 8
.Os
.Sh NAME
diff --git a/gnu/usr.sbin/sendmail/smrsh/smrsh.c b/gnu/usr.sbin/sendmail/smrsh/smrsh.c
index 93cfe4a3725..0d34c8af38b 100644
--- a/gnu/usr.sbin/sendmail/smrsh/smrsh.c
+++ b/gnu/usr.sbin/sendmail/smrsh/smrsh.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1993 Eric P. Allman. All rights reserved.
* Copyright (c) 1993
@@ -14,13 +14,13 @@
#include <sm/gen.h>
SM_IDSTR(copyright,
-"@(#) Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.\n\
+"@(#) Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.\n\
All rights reserved.\n\
Copyright (c) 1993 Eric P. Allman. All rights reserved.\n\
Copyright (c) 1993\n\
The Regents of the University of California. All rights reserved.\n")
-SM_IDSTR(id, "@(#)$Sendmail: smrsh.c,v 8.63 2003/12/15 17:12:29 ca Exp $")
+SM_IDSTR(id, "@(#)$Sendmail: smrsh.c,v 8.65 2004/08/06 18:54:22 ca Exp $")
/*
** SMRSH -- sendmail restricted shell
@@ -96,6 +96,8 @@ SM_IDSTR(id, "@(#)$Sendmail: smrsh.c,v 8.63 2003/12/15 17:12:29 ca Exp $")
char newcmdbuf[1000];
char *prg, *par;
+static void addcmd __P((char *, bool, size_t));
+
/*
** ADDCMD -- add a string to newcmdbuf, check for overflow
**
@@ -109,7 +111,7 @@ char *prg, *par;
**
*/
-void
+static void
addcmd(s, cmd, len)
char *s;
bool cmd;
diff --git a/gnu/usr.sbin/sendmail/vacation/vacation.c b/gnu/usr.sbin/sendmail/vacation/vacation.c
index 7fbdb2144b2..bb97e0e301e 100644
--- a/gnu/usr.sbin/sendmail/vacation/vacation.c
+++ b/gnu/usr.sbin/sendmail/vacation/vacation.c
@@ -20,7 +20,7 @@ SM_IDSTR(copyright,
The Regents of the University of California. All rights reserved.\n\
Copyright (c) 1983 Eric P. Allman. All rights reserved.\n")
-SM_IDSTR(id, "@(#)$Sendmail: vacation.c,v 8.141 2002/11/01 16:49:40 ca Exp $")
+SM_IDSTR(id, "@(#)$Sendmail: vacation.c,v 8.142 2004/11/02 18:25:33 ca Exp $")
#include <ctype.h>
@@ -78,6 +78,7 @@ ALIAS *Names = NULL;
SMDB_DATABASE *Db;
char From[MAXLINE];
+bool CloseMBDB = false;
#if defined(__hpux) || defined(__osf__)
# ifndef SM_CONF_SYSLOG_INT
@@ -100,17 +101,27 @@ static void eatmsg __P((void));
static void listdb __P((void));
/* exit after reading input */
-#define EXITIT(excode) \
-{ \
- eatmsg(); \
- return excode; \
+#define EXITIT(excode) \
+{ \
+ eatmsg(); \
+ if (CloseMBDB) \
+ { \
+ sm_mbdb_terminate(); \
+ CloseMBDB = false; \
+ } \
+ return excode; \
}
-#define EXITM(excode) \
-{ \
- if (!initdb && !list) \
- eatmsg(); \
- exit(excode); \
+#define EXITM(excode) \
+{ \
+ if (!initdb && !list) \
+ eatmsg(); \
+ if (CloseMBDB) \
+ { \
+ sm_mbdb_terminate(); \
+ CloseMBDB = false; \
+ } \
+ exit(excode); \
}
int
@@ -330,6 +341,7 @@ main(argc, argv)
sm_strexit(err));
EXITM(err);
}
+ CloseMBDB = true;
err = sm_mbdb_lookup(*argv, &user);
if (err == EX_NOUSER)
{