Resolve conflicts from sendmail 8.12.4 import

This commit is contained in:
Gregory Neil Shapiro 2002-06-11 21:16:51 +00:00
parent 85145119ed
commit 88ad41d4f0
20 changed files with 142 additions and 66 deletions

View File

@ -303,4 +303,4 @@ define(`confMILTER_MACROS_ENVRCPT', ``{rcpt_mailer}, {rcpt_host}, {rcpt_addr}'')
divert(0)dnl divert(0)dnl
VERSIONID(`$Id: cfhead.m4,v 1.1.1.7 2002/02/17 21:56:44 gshapiro Exp $') VERSIONID(`$Id: cfhead.m4,v 8.107 2001/07/22 03:25:37 ca Exp $')

View File

@ -14,7 +14,7 @@ divert(-1)
# #
divert(0) divert(0)
VERSIONID(`$Id: bsd4.4.m4,v 1.1.1.3 2000/08/12 21:55:39 gshapiro Exp $') VERSIONID(`$Id: bsd4.4.m4,v 8.14 1999/04/24 05:37:40 gshapiro Exp $')
ifdef(`STATUS_FILE',, `define(`STATUS_FILE', `/var/log/sendmail.st')')dnl ifdef(`STATUS_FILE',, `define(`STATUS_FILE', `/var/log/sendmail.st')')dnl
ifdef(`LOCAL_MAILER_PATH',, `define(`LOCAL_MAILER_PATH', /usr/libexec/mail.local)')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(`LOCAL_MAILER_ARGS',, `define(`LOCAL_MAILER_ARGS', `mail $u')')dnl

View File

@ -11,7 +11,7 @@
# the sendmail distribution. # the sendmail distribution.
# #
# #
# $Id: makeinfo.sh,v 1.1.1.3 2000/08/12 21:55:41 gshapiro Exp $ # $Id: makeinfo.sh,v 8.14 1999/02/07 07:26:25 gshapiro Exp $
# #
# $FreeBSD$ # $FreeBSD$
# #

View File

@ -8,7 +8,7 @@
.\" the sendmail distribution. .\" the sendmail distribution.
.\" .\"
.\" .\"
.\" $Id: mail.local.8,v 1.1.1.6 2002/02/17 21:56:42 gshapiro Exp $ .\" $Id: mail.local.8,v 8.23 2001/04/05 23:27:35 gshapiro Exp $
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"

View File

@ -18,7 +18,7 @@ SM_IDSTR(copyright,
Copyright (c) 1990, 1993, 1994\n\ Copyright (c) 1990, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n") The Regents of the University of California. All rights reserved.\n")
SM_IDSTR(id, "@(#)$Id: mail.local.c,v 1.1.1.9 2002/04/10 03:04:53 gshapiro Exp $") SM_IDSTR(id, "@(#)$Id: mail.local.c,v 8.239 2002/05/24 20:56:32 gshapiro Exp $")
#include <stdlib.h> #include <stdlib.h>
#include <sm/errstring.h> #include <sm/errstring.h>
@ -533,7 +533,7 @@ dolmtp()
"Nested MAIL command"); "Nested MAIL command");
continue; continue;
} }
if (sm_strncasecmp(buf+5, "from:", 5) != 0 || if (sm_strncasecmp(buf + 5, "from:", 5) != 0 ||
((return_path = parseaddr(buf + 10, ((return_path = parseaddr(buf + 10,
false)) == NULL)) false)) == NULL))
{ {
@ -870,7 +870,7 @@ deliver(fd, name)
off_t headerbytes; off_t headerbytes;
int readamount; int readamount;
#endif /* CONTENTLENGTH */ #endif /* CONTENTLENGTH */
char biffmsg[100], buf[8*1024]; char biffmsg[100], buf[8 * 1024];
SM_MBDB_T user; SM_MBDB_T user;
/* /*

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers. * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
* All rights reserved. * All rights reserved.
* Copyright (c) 1983 Eric P. Allman. All rights reserved. * Copyright (c) 1983 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993 * Copyright (c) 1988, 1993
@ -20,7 +20,7 @@ SM_IDSTR(copyright,
Copyright (c) 1988, 1993\n\ Copyright (c) 1988, 1993\n\
The Regents of the University of California. All rights reserved.\n") The Regents of the University of California. All rights reserved.\n")
SM_IDSTR(id, "@(#)$Id: mailstats.c,v 1.1.1.8 2002/02/17 21:56:43 gshapiro Exp $") SM_IDSTR(id, "@(#)$Id: mailstats.c,v 8.98 2002/05/24 23:10:15 gshapiro Exp $")
/* $FreeBSD$ */ /* $FreeBSD$ */
@ -66,7 +66,7 @@ main(argc, argv)
#endif /* _FFR_QUARANTINE */ #endif /* _FFR_QUARANTINE */
time_t now; time_t now;
char mtable[MAXMAILERS][MNAMELEN + 1]; char mtable[MAXMAILERS][MNAMELEN + 1];
char sfilebuf[MAXLINE]; char sfilebuf[MAXPATHLEN];
char buf[MAXLINE]; char buf[MAXLINE];
struct statistics stats; struct statistics stats;
extern char *ctime(); extern char *ctime();
@ -110,7 +110,7 @@ main(argc, argv)
default: default:
usage: usage:
(void) sm_io_fputs(smioerr, SM_TIME_DEFAULT, (void) sm_io_fputs(smioerr, SM_TIME_DEFAULT,
"usage: mailstats [-C cffile] [-P] [-f stfile] [-o] [-p]\n"); "usage: mailstats [-C cffile] [-c] [-P] [-f stfile] [-o] [-p]\n");
exit(EX_USAGE); exit(EX_USAGE);
} }
} }
@ -141,6 +141,15 @@ main(argc, argv)
char *s; char *s;
register char *m; register char *m;
b = strchr(buf, '#');
if (b == NULL)
b = strchr(buf, '\n');
if (b == NULL)
b = &buf[strlen(buf)];
while (isascii(*--b) && isspace(*b))
continue;
*++b = '\0';
b = buf; b = buf;
switch (*b++) switch (*b++)
{ {
@ -173,14 +182,6 @@ main(argc, argv)
b); b);
exit(EX_CONFIG); exit(EX_CONFIG);
} }
b = strchr(sfilebuf, '#');
if (b == NULL)
b = strchr(sfilebuf, '\n');
if (b == NULL)
b = &sfilebuf[strlen(sfilebuf)];
while (isascii(*--b) && isspace(*b))
continue;
*++b = '\0';
if (sfile == NULL) if (sfile == NULL)
sfile = sfilebuf; sfile = sfilebuf;
@ -217,10 +218,10 @@ main(argc, argv)
{ {
(void) sm_io_fprintf(smioerr, SM_TIME_DEFAULT, (void) sm_io_fprintf(smioerr, SM_TIME_DEFAULT,
"mailstats: no statistics file located\n"); "mailstats: no statistics file located\n");
exit (EX_OSFILE); exit(EX_OSFILE);
} }
fd = open(sfile, O_RDONLY); fd = open(sfile, O_RDONLY, 0600);
if ((fd < 0) || (i = read(fd, &stats, sizeof stats)) < 0) if ((fd < 0) || (i = read(fd, &stats, sizeof stats)) < 0)
{ {
save_errno = errno; save_errno = errno;
@ -352,7 +353,7 @@ main(argc, argv)
(void) close(fd); (void) close(fd);
if (trunc) if (trunc)
{ {
fd = open(sfile, O_RDWR | O_TRUNC); fd = open(sfile, O_RDWR | O_TRUNC, 0600);
if (fd >= 0) if (fd >= 0)
(void) close(fd); (void) close(fd);
} }

View File

@ -20,7 +20,7 @@ SM_IDSTR(copyright,
Copyright (c) 1992, 1993\n\ Copyright (c) 1992, 1993\n\
The Regents of the University of California. All rights reserved.\n") The Regents of the University of California. All rights reserved.\n")
SM_IDSTR(id, "@(#)$Id: makemap.c,v 1.1.1.6 2002/02/17 21:56:43 gshapiro Exp $") SM_IDSTR(id, "@(#)$Id: makemap.c,v 8.175 2001/12/28 22:44:01 ca Exp $")
/* $FreeBSD$ */ /* $FreeBSD$ */

View File

@ -20,7 +20,7 @@ SM_IDSTR(copyright,
Copyright (c) 1988, 1993\n\ Copyright (c) 1988, 1993\n\
The Regents of the University of California. All rights reserved.\n") The Regents of the University of California. All rights reserved.\n")
SM_IDSTR(id, "@(#)$Id: praliases.c,v 1.1.1.7 2002/02/17 21:56:45 gshapiro Exp $") SM_IDSTR(id, "@(#)$Id: praliases.c,v 8.93 2001/09/11 04:05:07 gshapiro Exp $")
/* $FreeBSD$ */ /* $FreeBSD$ */

View File

@ -18,7 +18,7 @@ SM_IDSTR(copyright,
Copyright (c) 1988, 1993\n\ Copyright (c) 1988, 1993\n\
The Regents of the University of California. All rights reserved.\n") The Regents of the University of California. All rights reserved.\n")
SM_IDSTR(id, "@(#)$Id: rmail.c,v 1.1.1.8 2002/02/17 21:56:45 gshapiro Exp $") SM_IDSTR(id, "@(#)$Id: rmail.c,v 8.61 2001/09/18 21:45:29 gshapiro Exp $")
/* $FreeBSD$ */ /* $FreeBSD$ */

View File

@ -9,7 +9,7 @@
.\" the sendmail distribution. .\" the sendmail distribution.
.\" .\"
.\" .\"
.\" $Id: smrsh.8,v 1.1.1.5 2002/02/17 21:56:43 gshapiro Exp $ .\" $Id: smrsh.8,v 8.16 2002/04/25 13:33:40 ca Exp $
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
@ -80,7 +80,7 @@ Compilation should be trivial on most systems.
You may need to use \-DSMRSH_PATH=\e"\fIpath\fP\e" You may need to use \-DSMRSH_PATH=\e"\fIpath\fP\e"
to adjust the default search path to adjust the default search path
(defaults to ``/bin:/usr/bin'') (defaults to ``/bin:/usr/bin'')
and/or \-DSMRSH_CMDBIN=\e"\fIdir\fP\e" and/or \-DSMRSH_CMDDIR=\e"\fIdir\fP\e"
to change the default program directory to change the default program directory
(defaults to ``/usr/libexec/sm.bin''). (defaults to ``/usr/libexec/sm.bin'').
.SH FILES .SH FILES

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers. * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
* All rights reserved. * All rights reserved.
* Copyright (c) 1993 Eric P. Allman. All rights reserved. * Copyright (c) 1993 Eric P. Allman. All rights reserved.
* Copyright (c) 1993 * Copyright (c) 1993
@ -20,7 +20,7 @@ SM_IDSTR(copyright,
Copyright (c) 1993\n\ Copyright (c) 1993\n\
The Regents of the University of California. All rights reserved.\n") The Regents of the University of California. All rights reserved.\n")
SM_IDSTR(id, "@(#)$Id: smrsh.c,v 1.1.1.8 2002/02/17 21:56:43 gshapiro Exp $") SM_IDSTR(id, "@(#)$Id: smrsh.c,v 8.58 2002/05/25 02:41:31 ca Exp $")
/* $FreeBSD$ */ /* $FreeBSD$ */
@ -56,6 +56,7 @@ SM_IDSTR(id, "@(#)$Id: smrsh.c,v 1.1.1.8 2002/02/17 21:56:43 gshapiro Exp $")
#include <unistd.h> #include <unistd.h>
#include <sm/io.h> #include <sm/io.h>
#include <sm/limits.h>
#include <sm/string.h> #include <sm/string.h>
#include <sys/file.h> #include <sys/file.h>
#include <string.h> #include <string.h>
@ -128,10 +129,7 @@ addcmd(s, cmd, len)
exit(EX_UNAVAILABLE); exit(EX_UNAVAILABLE);
} }
if (cmd) if (cmd)
{ (void) sm_strlcat2(newcmdbuf, CMDDIR, "/", sizeof newcmdbuf);
(void) sm_strlcat(newcmdbuf, CMDDIR, sizeof newcmdbuf);
(void) sm_strlcat(newcmdbuf, "/", sizeof newcmdbuf);
}
(void) sm_strlcat(newcmdbuf, s, sizeof newcmdbuf); (void) sm_strlcat(newcmdbuf, s, sizeof newcmdbuf);
} }
@ -147,7 +145,6 @@ main(argc, argv)
int isexec; int isexec;
int save_errno; int save_errno;
char *newenv[2]; char *newenv[2];
char cmdbuf[1000];
char pathbuf[1000]; char pathbuf[1000];
char specialbuf[32]; char specialbuf[32];
@ -159,8 +156,7 @@ main(argc, argv)
# endif /* ! LOG_MAIL */ # endif /* ! LOG_MAIL */
#endif /* ! DEBUG */ #endif /* ! DEBUG */
(void) sm_strlcpy(pathbuf, "PATH=", sizeof pathbuf); (void) sm_strlcpyn(pathbuf, sizeof pathbuf, 2, "PATH=", PATH);
(void) sm_strlcat(pathbuf, PATH, sizeof pathbuf);
newenv[0] = pathbuf; newenv[0] = pathbuf;
newenv[1] = NULL; newenv[1] = NULL;
@ -219,7 +215,7 @@ main(argc, argv)
newcmdbuf[0] = '\0'; newcmdbuf[0] = '\0';
isexec = false; isexec = false;
while (*q) while (*q != '\0')
{ {
/* /*
** Strip off a leading pathname on the command name. For ** Strip off a leading pathname on the command name. For
@ -268,6 +264,7 @@ main(argc, argv)
if (strcmp(q, "exec") == 0 && p != NULL) if (strcmp(q, "exec") == 0 && p != NULL)
{ {
addcmd("exec ", false, strlen("exec ")); addcmd("exec ", false, strlen("exec "));
/* test _next_ arg */ /* test _next_ arg */
q = ++p; q = ++p;
isexec = true; isexec = true;
@ -276,16 +273,33 @@ main(argc, argv)
else if (strcmp(q, "exit") == 0 || strcmp(q, "echo") == 0) else if (strcmp(q, "exit") == 0 || strcmp(q, "echo") == 0)
{ {
addcmd(cmd, false, strlen(cmd)); addcmd(cmd, false, strlen(cmd));
/* test following chars */ /* test following chars */
} }
else else
{ {
char cmdbuf[MAXPATHLEN];
/* /*
** Check to see if the command name is legal. ** Check to see if the command name is legal.
*/ */
(void) sm_strlcpy(cmdbuf, CMDDIR, sizeof cmdbuf);
(void) sm_strlcat(cmdbuf, "/", sizeof cmdbuf); if (sm_strlcpyn(cmdbuf, sizeof cmdbuf, 3, CMDDIR,
(void) sm_strlcat(cmdbuf, cmd, sizeof cmdbuf); "/", cmd) >= sizeof cmdbuf)
{
/* too long */
(void) sm_io_fprintf(smioerr, SM_TIME_DEFAULT,
"%s: %s not available for sendmail programs (filename too long)\n",
prg, cmd);
if (p != NULL)
*p = ' ';
#ifndef DEBUG
syslog(LOG_CRIT, "uid %d: attempt to use %s (filename too long)",
(int) getuid(), cmd);
#endif /* ! DEBUG */
exit(EX_UNAVAILABLE);
}
#ifdef DEBUG #ifdef DEBUG
(void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT,
"Trying %s\n", cmdbuf); "Trying %s\n", cmdbuf);
@ -347,7 +361,7 @@ main(argc, argv)
(int) getuid(), *r, par); (int) getuid(), *r, par);
#endif /* ! DEBUG */ #endif /* ! DEBUG */
exit(EX_UNAVAILABLE); exit(EX_UNAVAILABLE);
} /* end of while *q */ }
if (isexec) if (isexec)
{ {
(void) sm_io_fprintf(smioerr, SM_TIME_DEFAULT, (void) sm_io_fprintf(smioerr, SM_TIME_DEFAULT,

View File

@ -9,7 +9,7 @@
.\" the sendmail distribution. .\" the sendmail distribution.
.\" .\"
.\" .\"
.\" $Id: aliases.5,v 1.1.1.5 2002/02/17 21:56:38 gshapiro Exp $ .\" $Id: aliases.5,v 8.17 2000/12/14 23:09:46 gshapiro Exp $
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"

View File

@ -13,7 +13,7 @@
#include <sendmail.h> #include <sendmail.h>
SM_RCSID("@(#)$Id: conf.c,v 1.1.1.12 2002/04/10 03:04:48 gshapiro Exp $") SM_RCSID("@(#)$Id: conf.c,v 8.969 2002/05/24 23:48:55 gshapiro Exp $")
/* $FreeBSD$ */ /* $FreeBSD$ */
@ -2329,6 +2329,25 @@ typedef unsigned int *pt_entry_t;
# define SPT_BUFSIZE MAXLINE # define SPT_BUFSIZE MAXLINE
#endif /* ! SPT_BUFSIZE */ #endif /* ! SPT_BUFSIZE */
#if _FFR_SPT_ALIGN
/*
** It looks like the Compaq Tru64 5.1A now aligns argv and envp to
** 64 bit alignment, so unless each piece of argv and envp is a multiple
** of 8 bytes (including terminating NULL), initsetproctitle() won't use
** any of the space beyond argv[0]. Be sure to set SPT_ALIGN_SIZE if
** you use this FFR.
*/
# ifdef SPT_ALIGN_SIZE
# define SPT_ALIGN(x, align) ((((x) + SPT_ALIGN_SIZE) >> (align)) << (align))
# else /* SPT_ALIGN_SIZE */
# define SPT_ALIGN(x, align) (x)
# endif /* SPT_ALIGN_SIZE */
#else /* _FFR_SPT_ALIGN */
# define SPT_ALIGN(x, align) (x)
#endif /* _FFR_SPT_ALIGN */
/* /*
** Pointers for setproctitle. ** Pointers for setproctitle.
** This allows "ps" listings to give more useful information. ** This allows "ps" listings to give more useful information.
@ -2347,6 +2366,7 @@ initsetproctitle(argc, argv, envp)
char **envp; char **envp;
{ {
register int i; register int i;
int align;
extern char **environ; extern char **environ;
/* /*
@ -2371,15 +2391,24 @@ initsetproctitle(argc, argv, envp)
** Determine how much space we can use for setproctitle. ** Determine how much space we can use for setproctitle.
** Use all contiguous argv and envp pointers starting at argv[0] ** Use all contiguous argv and envp pointers starting at argv[0]
*/ */
align = -1;
#if _FFR_SPT_ALIGN
# ifdef SPT_ALIGN_SIZE
for (i = SPT_ALIGN_SIZE; i > 0; i >>= 1)
align++;
# endif /* SPT_ALIGN_SIZE */
#endif /* _FFR_SPT_ALIGN */
for (i = 0; i < argc; i++) for (i = 0; i < argc; i++)
{ {
if (i == 0 || LastArgv + 1 == argv[i]) if (i == 0 || LastArgv + 1 == argv[i])
LastArgv = argv[i] + strlen(argv[i]); LastArgv = argv[i] + SPT_ALIGN(strlen(argv[i]), align);
} }
for (i = 0; LastArgv != NULL && envp[i] != NULL; i++) for (i = 0; LastArgv != NULL && envp[i] != NULL; i++)
{ {
if (LastArgv + 1 == envp[i]) if (LastArgv + 1 == envp[i])
LastArgv = envp[i] + strlen(envp[i]); LastArgv = envp[i] + SPT_ALIGN(strlen(envp[i]), align);
} }
} }
@ -2744,7 +2773,8 @@ uname(name)
{ {
char buf[MAXLINE]; char buf[MAXLINE];
while (sm_io_fgets(file, SM_TIME_DEFAULT, buf, MAXLINE) != NULL) while (sm_io_fgets(file, SM_TIME_DEFAULT,
buf, sizeof buf) != NULL)
{ {
if (sm_io_sscanf(buf, "#define sysname \"%*[^\"]\"", if (sm_io_sscanf(buf, "#define sysname \"%*[^\"]\"",
NODE_LENGTH, name->nodename) > 0) NODE_LENGTH, name->nodename) > 0)
@ -5556,7 +5586,11 @@ char *CompileOptions[] =
"PIPELINING", "PIPELINING",
#endif /* PIPELINING */ #endif /* PIPELINING */
#if SASL #if SASL
# if SASL >= 20000
"SASLv2",
# else /* SASL >= 20000 */
"SASL", "SASL",
# endif /* SASL >= 20000 */
#endif /* SASL */ #endif /* SASL */
#if SCANF #if SCANF
"SCANF", "SCANF",
@ -5833,6 +5867,9 @@ char *FFRCompileOptions[] =
#if _FFR_CHECK_EOM #if _FFR_CHECK_EOM
"_FFR_CHECK_EOM", "_FFR_CHECK_EOM",
#endif /* _FFR_CHECK_EOM */ #endif /* _FFR_CHECK_EOM */
#if _FFR_CHK_QUEUE
"_FFR_CHK_QUEUE",
#endif /* _FFR_CHK_QUEUE */
#if _FFR_CONTROL_MSTAT #if _FFR_CONTROL_MSTAT
"_FFR_CONTROL_MSTAT", "_FFR_CONTROL_MSTAT",
#endif /* _FFR_CONTROL_MSTAT */ #endif /* _FFR_CONTROL_MSTAT */
@ -5948,21 +5985,35 @@ char *FFRCompileOptions[] =
#if _FFR_RESET_MACRO_GLOBALS #if _FFR_RESET_MACRO_GLOBALS
"_FFR_RESET_MACRO_GLOBALS", "_FFR_RESET_MACRO_GLOBALS",
#endif /* _FFR_RESET_MACRO_GLOBALS */ #endif /* _FFR_RESET_MACRO_GLOBALS */
#if _FFR_RESPOND_ALL
/* in vacation */
"_FFR_RESPOND_ALL",
#endif /* _FFR_RESPOND_ALL */
#if _FFR_RHS #if _FFR_RHS
"_FFR_RHS", "_FFR_RHS",
#endif /* _FFR_RHS */ #endif /* _FFR_RHS */
#if _FFR_SASL_OPT_M
"_FFR_SASL_OPT_M",
#endif /* _FFR_SASL_OPT_M */
#if _FFR_SELECT_SHM #if _FFR_SELECT_SHM
"_FFR_SELECT_SHM", "_FFR_SELECT_SHM",
#endif /* _FFR_SELECT_SHM */ #endif /* _FFR_SELECT_SHM */
#if _FFR_SHM_STATUS #if _FFR_SHM_STATUS
"_FFR_SHM_STATUS", "_FFR_SHM_STATUS",
#endif /* _FFR_SHM_STATUS */ #endif /* _FFR_SHM_STATUS */
#if _FFR_SMFI_OPENSOCKET
"_FFR_SMFI_OPENSOCKET",
#endif /* _FFR_SMFI_OPENSOCKET */
#if _FFR_SMTP_SSL #if _FFR_SMTP_SSL
"_FFR_SMTP_SSL", "_FFR_SMTP_SSL",
#endif /* _FFR_SMTP_SSL */ #endif /* _FFR_SMTP_SSL */
#if _FFR_SOFT_BOUNCE #if _FFR_SOFT_BOUNCE
"_FFR_SOFT_BOUNCE", "_FFR_SOFT_BOUNCE",
#endif /* _FFR_SOFT_BOUNCE */ #endif /* _FFR_SOFT_BOUNCE */
#if _FFR_SPT_ALIGN
/* Chris Adams of HiWAAY Informations Services */
"_FFR_SPT_ALIGN",
#endif /* _FFR_SPT_ALIGN */
#if _FFR_TIMERS #if _FFR_TIMERS
"_FFR_TIMERS", "_FFR_TIMERS",
#endif /* _FFR_TIMERS */ #endif /* _FFR_TIMERS */

View File

@ -10,7 +10,7 @@
* the sendmail distribution. * the sendmail distribution.
* *
* *
* $Id: conf.h,v 1.1.1.12 2002/04/10 03:04:48 gshapiro Exp $ * $Id: conf.h,v 8.562 2002/05/22 19:46:26 gshapiro Exp $
*/ */
/* $FreeBSD$ */ /* $FreeBSD$ */
@ -135,6 +135,16 @@ struct rusage; /* forward declaration to get gcc to shut up in wait.h */
# endif /* ! AUTH_MECHANISMS */ # endif /* ! AUTH_MECHANISMS */
#endif /* SASL */ #endif /* SASL */
/*
** Default database permissions (alias, maps, etc.)
** Used by sendmail and libsmdb
*/
#ifndef DBMMODE
# define DBMMODE 0640
#endif /* ! DBMMODE */
/********************************************************************** /**********************************************************************
** Compilation options. ** Compilation options.
** #define these to 1 if they are available; ** #define these to 1 if they are available;

View File

@ -13,7 +13,7 @@
#include <sendmail.h> #include <sendmail.h>
SM_RCSID("@(#)$Id: err.c,v 1.1.1.7 2002/02/17 21:56:39 gshapiro Exp $") SM_RCSID("@(#)$Id: err.c,v 8.189 2002/01/09 18:52:30 ca Exp $")
/* $FreeBSD$ */ /* $FreeBSD$ */

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers. .\" Copyright (c) 1998-2000, 2002 Sendmail, Inc. and its suppliers.
.\" All rights reserved. .\" All rights reserved.
.\" Copyright (c) 1983, 1997 Eric P. Allman. All rights reserved. .\" Copyright (c) 1983, 1997 Eric P. Allman. All rights reserved.
.\" Copyright (c) 1985, 1990, 1993 .\" Copyright (c) 1985, 1990, 1993
@ -9,7 +9,7 @@
.\" the sendmail distribution. .\" the sendmail distribution.
.\" .\"
.\" .\"
.\" $Id: mailq.1,v 1.1.1.6 2002/02/17 21:56:39 gshapiro Exp $ .\" $Id: mailq.1,v 8.19 2002/04/12 05:07:58 gshapiro Exp $
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"

View File

@ -15,7 +15,7 @@
#include <sendmail.h> #include <sendmail.h>
SM_RCSID("@(#)$Id: mci.c,v 1.1.1.7 2002/04/10 03:04:50 gshapiro Exp $") SM_RCSID("@(#)$Id: mci.c,v 8.205 2002/05/24 18:53:48 gshapiro Exp $")
#if NETINET || NETINET6 #if NETINET || NETINET6
# include <arpa/inet.h> # include <arpa/inet.h>
@ -656,7 +656,7 @@ mci_lock_host_statfile(mci)
{ {
int save_errno = errno; int save_errno = errno;
int retVal = EX_OK; int retVal = EX_OK;
char fname[MAXPATHLEN + 1]; char fname[MAXPATHLEN];
if (HostStatDir == NULL || mci->mci_host == NULL) if (HostStatDir == NULL || mci->mci_host == NULL)
return EX_OK; return EX_OK;
@ -775,7 +775,7 @@ mci_load_persistent(mci)
int save_errno = errno; int save_errno = errno;
bool locked = true; bool locked = true;
SM_FILE_T *fp; SM_FILE_T *fp;
char fname[MAXPATHLEN + 1]; char fname[MAXPATHLEN];
if (mci == NULL) if (mci == NULL)
{ {
@ -1062,7 +1062,7 @@ mci_traverse_persistent(action, pathname)
size_t len; size_t len;
char *newptr; char *newptr;
struct dirent *e; struct dirent *e;
char newpath[MAXPATHLEN + 1]; char newpath[MAXPATHLEN];
if ((d = opendir(pathname)) == NULL) if ((d = opendir(pathname)) == NULL)
{ {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers. * Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
* All rights reserved. * All rights reserved.
* Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
* Copyright (c) 1988, 1993 * Copyright (c) 1988, 1993
@ -15,7 +15,7 @@
#include <sendmail.h> #include <sendmail.h>
SM_RCSID("@(#)$Id: savemail.c,v 1.1.1.9 2002/02/17 21:56:41 gshapiro Exp $") SM_RCSID("@(#)$Id: savemail.c,v 8.299 2002/05/24 20:50:17 gshapiro Exp $")
static void errbody __P((MCI *, ENVELOPE *, char *)); static void errbody __P((MCI *, ENVELOPE *, char *));
static bool pruneroute __P((char *)); static bool pruneroute __P((char *));
@ -67,6 +67,7 @@ savemail(e, sendbody)
int flags; int flags;
long sff; long sff;
char buf[MAXLINE + 1]; char buf[MAXLINE + 1];
char dlbuf[MAXPATHLEN];
SM_MBDB_T user; SM_MBDB_T user;
@ -367,20 +368,20 @@ savemail(e, sendbody)
p = macvalue('g', e); p = macvalue('g', e);
macdefine(&e->e_macro, A_PERM, 'g', e->e_sender); macdefine(&e->e_macro, A_PERM, 'g', e->e_sender);
expand("\201z/dead.letter", buf, sizeof buf, e); expand("\201z/dead.letter", dlbuf, sizeof dlbuf, e);
sff = SFF_CREAT|SFF_REGONLY|SFF_RUNASREALUID; sff = SFF_CREAT|SFF_REGONLY|SFF_RUNASREALUID;
if (RealUid == 0) if (RealUid == 0)
sff |= SFF_ROOTOK; sff |= SFF_ROOTOK;
e->e_to = buf; e->e_to = dlbuf;
if (writable(buf, NULL, sff) && if (writable(dlbuf, NULL, sff) &&
mailfile(buf, FileMailer, NULL, sff, e) == EX_OK) mailfile(dlbuf, FileMailer, NULL, sff, e) == EX_OK)
{ {
int oldverb = Verbose; int oldverb = Verbose;
if (OpMode != MD_DAEMON && OpMode != MD_SMTP) if (OpMode != MD_DAEMON && OpMode != MD_SMTP)
Verbose = 1; Verbose = 1;
if (Verbose > 0) if (Verbose > 0)
message("Saved message in %s", buf); message("Saved message in %s", dlbuf);
Verbose = oldverb; Verbose = oldverb;
macdefine(&e->e_macro, A_PERM, 'g', p); macdefine(&e->e_macro, A_PERM, 'g', p);
state = ESM_DONE; state = ESM_DONE;

View File

@ -1,4 +1,4 @@
.\" Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers. .\" Copyright (c) 1998-2002 Sendmail, Inc. and its suppliers.
.\" All rights reserved. .\" All rights reserved.
.\" Copyright (c) 1983, 1997 Eric P. Allman. All rights reserved. .\" Copyright (c) 1983, 1997 Eric P. Allman. All rights reserved.
.\" Copyright (c) 1988, 1991, 1993 .\" Copyright (c) 1988, 1991, 1993
@ -9,7 +9,7 @@
.\" the sendmail distribution. .\" the sendmail distribution.
.\" .\"
.\" .\"
.\" $Id: sendmail.8,v 1.1.1.6 2002/02/17 21:56:41 gshapiro Exp $ .\" $Id: sendmail.8,v 8.51 2002/05/24 15:42:13 ca Exp $
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
@ -95,8 +95,7 @@ the ``From:'' and ``Sender:''
fields are examined for the name of the sender. fields are examined for the name of the sender.
.TP .TP
.B \-bd .B \-bd
Run as a daemon. This requires Berkeley Run as a daemon.
IPC.
.B Sendmail .B Sendmail
will fork and run in background will fork and run in background
listening on socket 25 for incoming listening on socket 25 for incoming

View File

@ -9,7 +9,7 @@
.\" the sendmail distribution. .\" the sendmail distribution.
.\" .\"
.\" .\"
.\" $Id: vacation.1,v 1.1.1.5 2002/04/10 03:05:00 gshapiro Exp $ .\" $Id: vacation.1,v 8.29 2002/03/23 19:17:36 gshapiro Exp $
.\" .\"
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"