summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorgshapiro <gshapiro@FreeBSD.org>2001-05-28 17:10:35 +0000
committergshapiro <gshapiro@FreeBSD.org>2001-05-28 17:10:35 +0000
commitfe77e70108d5e4da42ec6ee7e4f1bfaccd64ef04 (patch)
tree94f6971eb38134bbccc202099b9cf11ca0d5b908 /contrib
parent175e3eb50e42986bc6de77adab1f3e58878b2a88 (diff)
downloadFreeBSD-src-fe77e70108d5e4da42ec6ee7e4f1bfaccd64ef04.zip
FreeBSD-src-fe77e70108d5e4da42ec6ee7e4f1bfaccd64ef04.tar.gz
Resolve conflicts from 8.11.4 import
Diffstat (limited to 'contrib')
-rw-r--r--contrib/sendmail/cf/m4/cfhead.m43
-rw-r--r--contrib/sendmail/mailstats/mailstats.c6
-rw-r--r--contrib/sendmail/praliases/praliases.c16
-rw-r--r--contrib/sendmail/rmail/rmail.c4
-rw-r--r--contrib/sendmail/smrsh/smrsh.c5
-rw-r--r--contrib/sendmail/src/conf.c160
-rw-r--r--contrib/sendmail/src/conf.h16
-rw-r--r--contrib/sendmail/src/err.c18
-rw-r--r--contrib/sendmail/src/headers.c4
-rw-r--r--contrib/sendmail/src/mci.c13
-rw-r--r--contrib/sendmail/src/savemail.c6
11 files changed, 169 insertions, 82 deletions
diff --git a/contrib/sendmail/cf/m4/cfhead.m4 b/contrib/sendmail/cf/m4/cfhead.m4
index 2ad1178..db4df2f 100644
--- a/contrib/sendmail/cf/m4/cfhead.m4
+++ b/contrib/sendmail/cf/m4/cfhead.m4
@@ -225,7 +225,6 @@ define(`confRECEIVED_HEADER', `_REC_HDR_
_REC_TLS_
_REC_END_')
define(`confSEVEN_BIT_INPUT', `False')
-define(`confEIGHT_BIT_HANDLING', `pass8')
define(`confALIAS_WAIT', `10')
define(`confMIN_FREE_BLOCKS', `100')
define(`confBLANK_SUB', `.')
@@ -254,4 +253,4 @@ define(`confMILTER_MACROS_ENVRCPT', ``{rcpt_mailer}, {rcpt_host}, {rcpt_addr}'')
divert(0)dnl
-VERSIONID(`$Id: cfhead.m4,v 8.76.4.15 2001/02/14 04:07:20 gshapiro Exp $')
+VERSIONID(`$Id: cfhead.m4,v 8.76.4.16 2001/03/06 22:56:36 ca Exp $')
diff --git a/contrib/sendmail/mailstats/mailstats.c b/contrib/sendmail/mailstats/mailstats.c
index 540c517..20a539b 100644
--- a/contrib/sendmail/mailstats/mailstats.c
+++ b/contrib/sendmail/mailstats/mailstats.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -14,14 +14,14 @@
#ifndef lint
static char copyright[] =
-"@(#) Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.\n\
+"@(#) Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.\n\
All rights reserved.\n\
Copyright (c) 1988, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* ! lint */
#ifndef lint
-static char id[] = "@(#)$Id: mailstats.c,v 8.53.16.12 2001/02/15 20:52:36 geir Exp $";
+static char id[] = "@(#)$Id: mailstats.c,v 8.53.16.13 2001/05/07 22:06:38 gshapiro Exp $";
#endif /* ! lint */
/* $FreeBSD$ */
diff --git a/contrib/sendmail/praliases/praliases.c b/contrib/sendmail/praliases/praliases.c
index b4d4414..47ac4e5 100644
--- a/contrib/sendmail/praliases/praliases.c
+++ b/contrib/sendmail/praliases/praliases.c
@@ -21,7 +21,7 @@ static char copyright[] =
#endif /* ! lint */
#ifndef lint
-static char id[] = "@(#)$Id: praliases.c,v 8.59.4.18 2001/01/22 19:00:18 gshapiro Exp $";
+static char id[] = "@(#)$Id: praliases.c,v 8.59.4.19 2001/02/28 02:37:57 ca Exp $";
#endif /* ! lint */
/* $FreeBSD$ */
@@ -359,12 +359,20 @@ praliases(filename, argc, argv)
}
else for (; *argv != NULL; ++argv)
{
+ int get_res;
+
memset(&db_key, '\0', sizeof db_key);
memset(&db_value, '\0', sizeof db_value);
db_key.data = *argv;
- db_key.size = strlen(*argv) + 1;
- if (database->smdb_get(database, &db_key,
- &db_value, 0) == SMDBE_OK)
+ db_key.size = strlen(*argv);
+ get_res = database->smdb_get(database, &db_key, &db_value, 0);
+ if (get_res == SMDBE_NOT_FOUND)
+ {
+ db_key.size++;
+ get_res = database->smdb_get(database, &db_key,
+ &db_value, 0);
+ }
+ if (get_res == SMDBE_OK)
{
printf("%.*s:%.*s\n",
(int) db_key.size,
diff --git a/contrib/sendmail/rmail/rmail.c b/contrib/sendmail/rmail/rmail.c
index f9f4e5e..40c5aac 100644
--- a/contrib/sendmail/rmail/rmail.c
+++ b/contrib/sendmail/rmail/rmail.c
@@ -12,14 +12,14 @@
#ifndef lint
static char copyright[] =
-"@(#) Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.\n\
+"@(#) Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.\n\
All rights reserved.\n\
Copyright (c) 1988, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* ! lint */
#ifndef lint
-static char id[] = "@(#)$Id: rmail.c,v 8.39.4.11 2001/02/14 04:07:25 gshapiro Exp $";
+static char id[] = "@(#)$Id: rmail.c,v 8.39.4.12 2001/05/07 22:06:39 gshapiro Exp $";
#endif /* ! lint */
/* $FreeBSD$ */
diff --git a/contrib/sendmail/smrsh/smrsh.c b/contrib/sendmail/smrsh/smrsh.c
index 9d45a92..c95deea 100644
--- a/contrib/sendmail/smrsh/smrsh.c
+++ b/contrib/sendmail/smrsh/smrsh.c
@@ -21,7 +21,7 @@ static char copyright[] =
#endif /* ! lint */
#ifndef lint
-static char id[] = "@(#)$Id: smrsh.c,v 8.31.4.8 2001/01/22 19:00:26 gshapiro Exp $";
+static char id[] = "@(#)$Id: smrsh.c,v 8.31.4.9 2001/04/24 04:11:51 ca Exp $";
#endif /* ! lint */
/* $FreeBSD$ */
@@ -175,7 +175,6 @@ main(argc, argv)
*/
prg = argv[0];
- par = argv[2];
if (argc != 3 || strcmp(argv[1], "-c") != 0)
{
@@ -186,6 +185,8 @@ main(argc, argv)
exit(EX_USAGE);
}
+ par = argv[2];
+
/*
** Disallow special shell syntax. This is overly restrictive,
** but it should shut down all attacks.
diff --git a/contrib/sendmail/src/conf.c b/contrib/sendmail/src/conf.c
index ab082f8..e3cfa63 100644
--- a/contrib/sendmail/src/conf.c
+++ b/contrib/sendmail/src/conf.c
@@ -12,7 +12,7 @@
*/
#ifndef lint
-static char id[] = "@(#)$Id: conf.c,v 8.646.2.2.2.69 2001/02/27 19:50:11 gshapiro Exp $";
+static char id[] = "@(#)$Id: conf.c,v 8.646.2.2.2.86 2001/05/17 18:18:40 ca Exp $";
#endif /* ! lint */
/* $FreeBSD$ */
@@ -978,7 +978,7 @@ switch_map_find(service, maptype, mapreturn)
st = stab(buf, ST_SERVICE, ST_ENTER);
if (st->s_service[0] != NULL)
- free((void *) st->s_service[0]);
+ sm_free((void *) st->s_service[0]);
p = newstr(p);
for (svcno = 0; svcno < MAXMAPSTACK; )
{
@@ -1228,6 +1228,10 @@ checkcompat(to, e)
** SETSIGNAL -- set a signal handler
**
** This is essentially old BSD "signal(3)".
+**
+** NOTE: THIS CAN BE CALLED FROM A SIGNAL HANDLER. DO NOT ADD
+** ANYTHING TO THIS ROUTINE UNLESS YOU KNOW WHAT YOU ARE
+** DOING.
*/
sigfunc_t
@@ -1235,14 +1239,16 @@ setsignal(sig, handler)
int sig;
sigfunc_t handler;
{
+# if defined(SA_RESTART) || (!defined(SYS5SIGNALS) && !defined(BSD4_3))
+ struct sigaction n, o;
+# endif /* defined(SA_RESTART) || (!defined(SYS5SIGNALS) && !defined(BSD4_3)) */
+
/*
** First, try for modern signal calls
** and restartable syscalls
*/
# ifdef SA_RESTART
- struct sigaction n, o;
-
memset(&n, '\0', sizeof n);
# if USE_SA_SIGACTION
n.sa_sigaction = (void(*)(int, siginfo_t *, void *)) handler;
@@ -1274,8 +1280,6 @@ setsignal(sig, handler)
** go for a default
*/
- struct sigaction n, o;
-
memset(&n, '\0', sizeof n);
n.sa_handler = handler;
if (sigaction(sig, &n, &o) < 0)
@@ -1285,6 +1289,73 @@ setsignal(sig, handler)
# endif /* SA_RESTART */
}
/*
+** ALLSIGNALS -- act on all signals
+**
+** Parameters:
+** block -- whether to block or release all signals.
+**
+** Returns:
+** none.
+*/
+
+void
+allsignals(block)
+ bool block;
+{
+# ifdef BSD4_3
+# ifndef sigmask
+# define sigmask(s) (1 << ((s) - 1))
+# endif /* ! sigmask */
+ if (block)
+ {
+ int mask = 0;
+
+ mask |= sigmask(SIGALRM);
+ mask |= sigmask(SIGCHLD);
+ mask |= sigmask(SIGHUP);
+ mask |= sigmask(SIGINT);
+ mask |= sigmask(SIGTERM);
+ mask |= sigmask(SIGUSR1);
+
+ (void) sigblock(mask);
+ }
+ else
+ sigsetmask(0);
+# else /* BSD4_3 */
+# ifdef ALTOS_SYSTEM_V
+ if (block)
+ {
+ (void) sigset(SIGALRM, SIG_HOLD);
+ (void) sigset(SIGCHLD, SIG_HOLD);
+ (void) sigset(SIGHUP, SIG_HOLD);
+ (void) sigset(SIGINT, SIG_HOLD);
+ (void) sigset(SIGTERM, SIG_HOLD);
+ (void) sigset(SIGUSR1, SIG_HOLD);
+ }
+ else
+ {
+ (void) sigset(SIGALRM, SIG_DFL);
+ (void) sigset(SIGCHLD, SIG_DFL);
+ (void) sigset(SIGHUP, SIG_DFL);
+ (void) sigset(SIGINT, SIG_DFL);
+ (void) sigset(SIGTERM, SIG_DFL);
+ (void) sigset(SIGUSR1, SIG_DFL);
+ }
+# else /* ALTOS_SYSTEM_V */
+ sigset_t sset;
+
+ (void) sigemptyset(&sset);
+ (void) sigaddset(&sset, SIGALRM);
+ (void) sigaddset(&sset, SIGCHLD);
+ (void) sigaddset(&sset, SIGHUP);
+ (void) sigaddset(&sset, SIGINT);
+ (void) sigaddset(&sset, SIGTERM);
+ (void) sigaddset(&sset, SIGUSR1);
+ (void) sigprocmask(block ? SIG_BLOCK : SIG_UNBLOCK, &sset, NULL);
+# endif /* ALTOS_SYSTEM_V */
+# endif /* BSD4_3 */
+}
+ /*
** BLOCKSIGNAL -- hold a signal to prevent delivery
**
** Parameters:
@@ -2443,7 +2514,7 @@ setproctitle(fmt, va_alist)
# if SPT_TYPE == SPT_SCO
off_t seek_off;
static int kmem = -1;
- static int kmempid = -1;
+ static pid_t kmempid = -1;
struct user u;
# endif /* SPT_TYPE == SPT_SCO */
@@ -2621,6 +2692,10 @@ waitfor(pid)
** Side Effects:
** Picks up extant zombies.
** Control socket exits may restart/shutdown daemon.
+**
+** NOTE: THIS CAN BE CALLED FROM A SIGNAL HANDLER. DO NOT ADD
+** ANYTHING TO THIS ROUTINE UNLESS YOU KNOW WHAT YOU ARE
+** DOING.
*/
/* ARGSUSED0 */
@@ -2631,32 +2706,30 @@ reapchild(sig)
int save_errno = errno;
int st;
pid_t pid;
-#if HASWAITPID
+# if HASWAITPID
auto int status;
int count;
+# else /* HASWAITPID */
+# ifdef WNOHANG
+ union wait status;
+# else /* WNOHANG */
+ auto int status;
+# endif /* WNOHANG */
+# endif /* HASWAITPID */
+# if HASWAITPID
count = 0;
while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
{
st = status;
if (count++ > 1000)
- {
- if (LogLevel > 0)
- sm_syslog(LOG_ALERT, NOQID,
- "reapchild: waitpid loop: pid=%d, status=%x",
- pid, status);
break;
- }
-#else /* HASWAITPID */
-# ifdef WNOHANG
- union wait status;
-
+# else /* HASWAITPID */
+# ifdef WNOHANG
while ((pid = wait3(&status, WNOHANG, (struct rusage *) NULL)) > 0)
{
st = status.w_status;
-# else /* WNOHANG */
- auto int status;
-
+# else /* WNOHANG */
/*
** Catch one zombie -- we will be re-invoked (we hope) if there
** are more. Unreliable signals probably break this, but this
@@ -2667,8 +2740,8 @@ reapchild(sig)
if ((pid = wait(&status)) > 0)
{
st = status;
-# endif /* WNOHANG */
-#endif /* HASWAITPID */
+# endif /* WNOHANG */
+# endif /* HASWAITPID */
/* Drop PID and check if it was a control socket child */
if (proc_list_drop(pid) == PROC_CONTROL &&
WIFEXITED(st))
@@ -2676,21 +2749,17 @@ reapchild(sig)
/* if so, see if we need to restart or shutdown */
if (WEXITSTATUS(st) == EX_RESTART)
{
- /* emulate a SIGHUP restart */
- sighup(0);
- /* NOTREACHED */
+ RestartRequest = "control socket";
}
else if (WEXITSTATUS(st) == EX_SHUTDOWN)
{
/* emulate a SIGTERM shutdown */
- intsig(0);
+ ShutdownRequest = "control socket";
/* NOTREACHED */
}
}
}
-#ifdef SYS5SIGNALS
- (void) setsignal(SIGCHLD, reapchild);
-#endif /* SYS5SIGNALS */
+ FIX_SYSV_SIGNAL(sig, reapchild);
errno = save_errno;
return SIGFUNC_RETURN;
}
@@ -2755,18 +2824,14 @@ putenv(str)
*/
if (first)
{
- newenv = (char **) malloc(sizeof(char *) * (envlen + 2));
- if (newenv == NULL)
- return -1;
-
+ newenv = (char **) xalloc(sizeof(char *) * (envlen + 2));
first = FALSE;
(void) memcpy(newenv, environ, sizeof(char *) * envlen);
}
else
{
- newenv = (char **) realloc((char *)environ, sizeof(char *) * (envlen + 2));
- if (newenv == NULL)
- return -1;
+ newenv = (char **) xrealloc((char *)environ,
+ sizeof(char *) * (envlen + 2));
}
/* actually add in the new entry */
@@ -4329,7 +4394,7 @@ strstr(big, little)
** Support IPv6 as well as IPv4.
*/
-#if NETINET6 && NEEDSGETIPNODE && __RES < 19990909
+#if NETINET6 && NEEDSGETIPNODE
# ifndef AI_DEFAULT
# define AI_DEFAULT 0 /* dummy */
@@ -4396,7 +4461,7 @@ freehostent(h)
return;
}
# endif /* _FFR_FREEHOSTENT */
-#endif /* NEEDSGETIPNODE && NETINET6 && __RES < 19990909 */
+#endif /* NEEDSGETIPNODE && NETINET6 */
struct hostent *
sm_gethostbyname(name, family)
@@ -4584,8 +4649,8 @@ sm_gethostbyaddr(addr, len, type)
# else /* NETINET6 */
hp = gethostbyaddr(addr, len, type);
# endif /* NETINET6 */
- return hp;
#endif /* (SOLARIS > 10000 && SOLARIS < 20400) || (defined(SOLARIS) && SOLARIS < 204) */
+ return hp;
}
/*
** SM_GETPW{NAM,UID} -- wrapper for getpwnam and getpwuid
@@ -4871,7 +4936,7 @@ load_if_names()
if (tTd(0, 4))
dprintf("SIOCGLIFCONF failed: %s\n", errstring(errno));
(void) close(s);
- free(lifc.lifc_buf);
+ sm_free(lifc.lifc_buf);
return;
}
@@ -4905,7 +4970,7 @@ load_if_names()
s = socket(af, SOCK_DGRAM, 0);
if (s == -1)
{
- free(lifc.lifc_buf);
+ sm_free(lifc.lifc_buf);
return;
}
@@ -5020,7 +5085,7 @@ load_if_names()
# endif /* SIOCGLIFFLAGS */
(void) add_hostnames(sa);
}
- free(lifc.lifc_buf);
+ sm_free(lifc.lifc_buf);
(void) close(s);
#else /* NETINET6 && defined(SIOCGLIFCONF) */
# if defined(SIOCGIFCONF) && !SIOCGIFCONF_IS_BROKEN
@@ -5060,7 +5125,7 @@ load_if_names()
if (tTd(0, 4))
dprintf("SIOCGIFCONF failed: %s\n", errstring(errno));
(void) close(s);
- free(ifc.ifc_buf);
+ sm_free(ifc.ifc_buf);
return;
}
@@ -5203,7 +5268,7 @@ load_if_names()
(void) add_hostnames(sa);
}
- free(ifc.ifc_buf);
+ sm_free(ifc.ifc_buf);
(void) close(s);
# undef IFRFREF
# endif /* defined(SIOCGIFCONF) && !SIOCGIFCONF_IS_BROKEN */
@@ -5377,7 +5442,7 @@ sm_syslog(level, id, fmt, va_alist)
/* String too small, redo with correct size */
bufsize += SnprfOverflow + 1;
if (buf != buf0)
- free(buf);
+ sm_free(buf);
buf = xalloc(bufsize * sizeof (char));
}
if ((strlen(buf) + idlen + 1) < SYSLOG_BUFSIZE)
@@ -5534,6 +5599,9 @@ local_hostname_length(hostname)
char *CompileOptions[] =
{
+#if EGD
+ "EGD",
+#endif /* EGD */
#ifdef HESIOD
"HESIOD",
#endif /* HESIOD */
diff --git a/contrib/sendmail/src/conf.h b/contrib/sendmail/src/conf.h
index 2b671e8..df1cec6 100644
--- a/contrib/sendmail/src/conf.h
+++ b/contrib/sendmail/src/conf.h
@@ -10,7 +10,7 @@
* the sendmail distribution.
*
*
- * $Id: conf.h,v 8.496.4.37 2001/02/12 21:40:16 gshapiro Exp $
+ * $Id: conf.h,v 8.496.4.43 2001/05/20 22:29:59 gshapiro Exp $
*/
/* $FreeBSD$ */
@@ -86,7 +86,7 @@ struct rusage; /* forward declaration to get gcc to shut up in wait.h */
#define MAXMIMEARGS 20 /* max args in Content-Type: */
#define MAXMIMENESTING 20 /* max MIME multipart nesting */
#define QUEUESEGSIZE 1000 /* increment for queue size */
-#define MAXQFNAME 20 /* max qf file name length */
+#define MAXQFNAME 21 /* max qf file name length */
#define MACBUFSIZE 4096 /* max expanded macro buffer size */
#define TOBUFSIZE SM_ARG_MAX /* max buffer to hold address list */
#define MAXSHORTSTR 203 /* max short string length */
@@ -553,6 +553,9 @@ typedef int pid_t;
# undef _PATH_SENDMAILPID /* tmpfs /var/run added in 2.8 */
# define _PATH_SENDMAILPID "/var/run/sendmail.pid"
# endif /* SOLARIS >= 20800 || (SOLARIS < 10000 && SOLARIS >= 208) */
+# if SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209)
+# define HASURANDOMDEV 1 /* /dev/[u]random added in S9 */
+# endif /* SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209) */
# ifndef HASGETUSERSHELL
# define HASGETUSERSHELL 0 /* getusershell(3) causes core dumps pre-2.7 */
# endif /* ! HASGETUSERSHELL */
@@ -1004,6 +1007,7 @@ typedef int pid_t;
# undef SPT_TYPE
# define SPT_TYPE SPT_BUILTIN /* setproctitle is in libc */
# define HASSETLOGIN 1 /* has setlogin(2) */
+# define HASSETREUID 0 /* OpenBSD has broken setreuid(2) emulation */
# define HASURANDOMDEV 1 /* has /dev/urandom(4) */
# if OpenBSD < 199912
# define HASSTRL 0 /* strlcat(3) is broken in 2.5 and earlier */
@@ -1470,10 +1474,10 @@ extern void *malloc();
# else /* (GLIBC_VERSION >= 0x201) */
# include <linux/in6.h> /* IPv6 support */
# endif /* (GLIBC_VERSION >= 0x201) */
-# if (GLIBC_VERSION == 0x201 && !defined(NEEDSGETIPNODE))
+# if (GLIBC_VERSION >= 0x201 && !defined(NEEDSGETIPNODE))
/* Have APIs in <netdb.h>, but no support in glibc */
# define NEEDSGETIPNODE 1
-# endif /* (GLIBC_VERSION == 0x201 && ! NEEDSGETIPNODE) */
+# endif /* (GLIBC_VERSION >= 0x201 && !defined(NEEDSGETIPNODE)) */
# undef GLIBC_VERSION
# endif /* defined(__GLIBC__) && defined(__GLIBC_MINOR__) */
# endif /* NETINET6 */
@@ -2245,7 +2249,9 @@ typedef struct msgb mblk_t;
/* general BSD defines */
#ifdef BSD
# define HASGETDTABLESIZE 1 /* has getdtablesize(2) call */
-# define HASSETREUID 1 /* has setreuid(2) call */
+# ifndef HASSETREUID
+# define HASSETREUID 1 /* has setreuid(2) call */
+# endif /* ! HASSETREUID */
# define HASINITGROUPS 1 /* has initgroups(3) call */
# ifndef IP_SRCROUTE
# define IP_SRCROUTE 1 /* can check IP source routing */
diff --git a/contrib/sendmail/src/err.c b/contrib/sendmail/src/err.c
index 8b65cf8..c8a69de 100644
--- a/contrib/sendmail/src/err.c
+++ b/contrib/sendmail/src/err.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -12,7 +12,7 @@
*/
#ifndef lint
-static char id[] = "@(#)$Id: err.c,v 8.120.4.1 2000/05/25 18:56:15 gshapiro Exp $";
+static char id[] = "@(#)$Id: err.c,v 8.120.4.2 2001/05/03 17:24:06 gshapiro Exp $";
#endif /* ! lint */
/* $FreeBSD$ */
@@ -109,7 +109,7 @@ syserr(fmt, va_alist)
if (!panic && CurEnv != NULL)
{
if (CurEnv->e_message != NULL)
- free(CurEnv->e_message);
+ sm_free(CurEnv->e_message);
CurEnv->e_message = newstr(errtxt);
}
@@ -124,13 +124,13 @@ syserr(fmt, va_alist)
dprintf("syserr: ExitStat = %d\n", ExitStat);
}
- pw = sm_getpwuid(getuid());
+ pw = sm_getpwuid(RealUid);
if (pw != NULL)
user = pw->pw_name;
else
{
user = ubuf;
- snprintf(ubuf, sizeof ubuf, "UID%d", (int) getuid());
+ snprintf(ubuf, sizeof ubuf, "UID%d", (int) RealUid);
}
if (LogLevel > 0)
@@ -239,7 +239,7 @@ usrerr(fmt, va_alist)
case '5':
case '6':
if (CurEnv->e_message != NULL)
- free(CurEnv->e_message);
+ sm_free(CurEnv->e_message);
if (MsgBuf[0] == '6')
{
char buf[MAXLINE];
@@ -325,7 +325,7 @@ usrerrenh(enhsc, fmt, va_alist)
case '5':
case '6':
if (CurEnv->e_message != NULL)
- free(CurEnv->e_message);
+ sm_free(CurEnv->e_message);
if (MsgBuf[0] == '6')
{
char buf[MAXLINE];
@@ -394,7 +394,7 @@ message(msg, va_alist)
case '5':
if (CurEnv->e_message != NULL)
- free(CurEnv->e_message);
+ sm_free(CurEnv->e_message);
CurEnv->e_message = newstr(errtxt);
break;
}
@@ -448,7 +448,7 @@ nmessage(msg, va_alist)
case '5':
if (CurEnv->e_message != NULL)
- free(CurEnv->e_message);
+ sm_free(CurEnv->e_message);
CurEnv->e_message = newstr(errtxt);
break;
}
diff --git a/contrib/sendmail/src/headers.c b/contrib/sendmail/src/headers.c
index a39caea..d6ddc72 100644
--- a/contrib/sendmail/src/headers.c
+++ b/contrib/sendmail/src/headers.c
@@ -12,7 +12,7 @@
*/
#ifndef lint
-static char id[] = "@(#)$Id: headers.c,v 8.203.4.12 2001/01/22 19:00:22 gshapiro Exp $";
+static char id[] = "@(#)$Id: headers.c,v 8.203.4.13 2001/05/03 17:24:06 gshapiro Exp $";
#endif /* ! lint */
/* $FreeBSD$ */
@@ -343,7 +343,7 @@ hse:
}
if ((sp = macvalue(macid("{currHeader}", NULL), e)) !=
NULL)
- free(sp);
+ sm_free(sp);
define(macid("{currHeader}", NULL), newstr(qval), e);
define(macid("{hdr_name}", NULL), newstr(fname), e);
(void) rscheck(rs, fvalue, NULL, e, stripcom, TRUE, 4,
diff --git a/contrib/sendmail/src/mci.c b/contrib/sendmail/src/mci.c
index 92f3382..c24117f 100644
--- a/contrib/sendmail/src/mci.c
+++ b/contrib/sendmail/src/mci.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
+ * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
* All rights reserved.
* Copyright (c) 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993
@@ -12,7 +12,7 @@
*/
#ifndef lint
-static char id[] = "@(#)$Id: mci.c,v 8.133.10.7 2000/12/12 00:39:34 ca Exp $";
+static char id[] = "@(#)$Id: mci.c,v 8.133.10.8 2001/05/03 17:24:10 gshapiro Exp $";
#endif /* ! lint */
/* $FreeBSD$ */
@@ -424,7 +424,7 @@ mci_setstat(mci, xstat, dstat, rstat)
mci->mci_status = dstat;
if (mci->mci_rstatus != NULL)
- free(mci->mci_rstatus);
+ sm_free(mci->mci_rstatus);
if (rstat != NULL)
rstat = newstr(rstat);
mci->mci_rstatus = rstat;
@@ -809,7 +809,7 @@ mci_read_persistent(fp, mci)
mci->mci_status = NULL;
if (mci->mci_rstatus != NULL)
- free(mci->mci_rstatus);
+ sm_free(mci->mci_rstatus);
mci->mci_rstatus = NULL;
rewind(fp);
@@ -1028,6 +1028,8 @@ mci_traverse_persistent(action, pathname)
sizeof newpath -
(newptr - newpath));
+ if (StopRequest)
+ stop_sendmail();
ret = mci_traverse_persistent(action, newpath);
if (ret < 0)
break;
@@ -1128,6 +1130,9 @@ mci_print_persistent(pathname, hostname)
if (hostname == NULL)
return 0;
+ if (StopRequest)
+ stop_sendmail();
+
if (!initflag)
{
initflag = TRUE;
diff --git a/contrib/sendmail/src/savemail.c b/contrib/sendmail/src/savemail.c
index 2d52e5e..4e310ba 100644
--- a/contrib/sendmail/src/savemail.c
+++ b/contrib/sendmail/src/savemail.c
@@ -12,7 +12,7 @@
*/
#ifndef lint
-static char id[] = "@(#)$Id: savemail.c,v 8.212.4.12 2001/01/07 19:31:05 gshapiro Exp $";
+static char id[] = "@(#)$Id: savemail.c,v 8.212.4.13 2001/05/03 17:24:15 gshapiro Exp $";
#endif /* ! lint */
/* $FreeBSD$ */
@@ -1415,7 +1415,7 @@ xtextify(t, taboo)
if (l > bplen)
{
if (bp != NULL)
- free(bp);
+ sm_free(bp);
bp = xalloc(l);
bplen = l;
}
@@ -1468,7 +1468,7 @@ xuntextify(t)
if (l > bplen)
{
if (bp != NULL)
- free(bp);
+ sm_free(bp);
bp = xalloc(l);
bplen = l;
}
OpenPOWER on IntegriCloud