summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail/src/deliver.c
diff options
context:
space:
mode:
authorgshapiro <gshapiro@FreeBSD.org>2002-06-11 21:12:04 +0000
committergshapiro <gshapiro@FreeBSD.org>2002-06-11 21:12:04 +0000
commitfaacdfb2c2946459651449cedf08a1bc29aee731 (patch)
tree546131e3b171104de8ab1498603b992a6971ec6a /contrib/sendmail/src/deliver.c
parente226f8e879ed5a8d2f5cc433067b698e07dce0b6 (diff)
downloadFreeBSD-src-faacdfb2c2946459651449cedf08a1bc29aee731.zip
FreeBSD-src-faacdfb2c2946459651449cedf08a1bc29aee731.tar.gz
Import sendmail 8.12.4
Diffstat (limited to 'contrib/sendmail/src/deliver.c')
-rw-r--r--contrib/sendmail/src/deliver.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/contrib/sendmail/src/deliver.c b/contrib/sendmail/src/deliver.c
index e190253..2b1fc4c 100644
--- a/contrib/sendmail/src/deliver.c
+++ b/contrib/sendmail/src/deliver.c
@@ -14,7 +14,7 @@
#include <sendmail.h>
#include <sys/time.h>
-SM_RCSID("@(#)$Id: deliver.c,v 1.1.1.11 2002/04/10 03:04:49 gshapiro Exp $")
+SM_RCSID("@(#)$Id: deliver.c,v 8.939 2002/05/25 00:46:00 gshapiro Exp $")
#if HASSETUSERCONTEXT
# include <login_cap.h>
@@ -1284,6 +1284,7 @@ deliver(e, firstto)
char *mxhosts[MAXMXHOSTS + 1];
char *pv[MAXPV + 1];
char buf[MAXNAME + 1];
+ char cbuf[MAXPATHLEN];
errno = 0;
if (!QS_IS_OK(to->q_state))
@@ -2450,14 +2451,14 @@ tryhost:
/* change root to some "safe" directory */
if (m->m_rootdir != NULL)
{
- expand(m->m_rootdir, buf, sizeof buf, e);
+ expand(m->m_rootdir, cbuf, sizeof cbuf, e);
if (tTd(11, 20))
sm_dprintf("openmailer: chroot %s\n",
- buf);
- if (chroot(buf) < 0)
+ cbuf);
+ if (chroot(cbuf) < 0)
{
syserr("openmailer: Cannot chroot(%s)",
- buf);
+ cbuf);
exit(EX_TEMPFAIL);
}
if (chdir("/") < 0)
@@ -2584,13 +2585,14 @@ tryhost:
q = strchr(p, ':');
if (q != NULL)
*q = '\0';
- expand(p, buf, sizeof buf, e);
+ expand(p, cbuf, sizeof cbuf, e);
if (q != NULL)
*q++ = ':';
if (tTd(11, 20))
sm_dprintf("openmailer: trydir %s\n",
- buf);
- if (buf[0] != '\0' && chdir(buf) >= 0)
+ cbuf);
+ if (cbuf[0] != '\0' &&
+ chdir(cbuf) >= 0)
break;
}
}
@@ -3029,7 +3031,11 @@ reconnect: /* after switching to an encrypted connection */
/* Get security strength (features) */
result = sasl_getprop(mci->mci_conn, SASL_SSF,
+# if SASL >= 20000
+ (const void **) &ssf);
+# else /* SASL >= 20000 */
(void **) &ssf);
+# endif /* SASL >= 20000 */
/* XXX authid? */
if (LogLevel > 9)
@@ -4974,8 +4980,8 @@ mailfile(filename, mailer, ctladdr, sfflags, e)
char *p;
char *volatile realfile;
SM_EVENT *ev;
- char buf[MAXLINE + 1];
- char targetfile[MAXPATHLEN + 1];
+ char buf[MAXPATHLEN];
+ char targetfile[MAXPATHLEN];
if (tTd(11, 1))
{
OpenPOWER on IntegriCloud