summaryrefslogtreecommitdiff
path: root/contrib/sendmail
diff options
context:
space:
mode:
authorGregory Neil Shapiro <gshapiro@FreeBSD.org>2002-08-28 17:58:45 +0000
committerGregory Neil Shapiro <gshapiro@FreeBSD.org>2002-08-28 17:58:45 +0000
commit9d8fddc1beae492542a37fa366b9ad05534c3442 (patch)
treef1282b9585de91c06e3664800eeaa78750bf941b /contrib/sendmail
parent4d75ea9b02177a3ee70df85b580686190943d599 (diff)
downloadsrc-test2-9d8fddc1beae492542a37fa366b9ad05534c3442.tar.gz
src-test2-9d8fddc1beae492542a37fa366b9ad05534c3442.zip
Notes
Diffstat (limited to 'contrib/sendmail')
-rw-r--r--contrib/sendmail/src/conf.c41
-rw-r--r--contrib/sendmail/src/headers.c18
2 files changed, 39 insertions, 20 deletions
diff --git a/contrib/sendmail/src/conf.c b/contrib/sendmail/src/conf.c
index 677aea2e0eb4..d3f962705002 100644
--- a/contrib/sendmail/src/conf.c
+++ b/contrib/sendmail/src/conf.c
@@ -13,7 +13,7 @@
#include <sendmail.h>
-SM_RCSID("@(#)$Id: conf.c,v 8.972 2002/06/18 16:11:44 ca Exp $")
+SM_RCSID("@(#)$Id: conf.c,v 8.972.2.5 2002/08/16 14:56:01 ca Exp $")
/* $FreeBSD$ */
@@ -2374,12 +2374,15 @@ initsetproctitle(argc, argv, envp)
** the top of memory.
*/
- for (i = 0; envp[i] != NULL; i++)
- continue;
- environ = (char **) xalloc(sizeof (char *) * (i + 1));
- for (i = 0; envp[i] != NULL; i++)
- environ[i] = newstr(envp[i]);
- environ[i] = NULL;
+ if (envp != NULL)
+ {
+ for (i = 0; envp[i] != NULL; i++)
+ continue;
+ environ = (char **) xalloc(sizeof (char *) * (i + 1));
+ for (i = 0; envp[i] != NULL; i++)
+ environ[i] = newstr(envp[i]);
+ environ[i] = NULL;
+ }
/*
** Save start and extent of argv for setproctitle.
@@ -2405,7 +2408,7 @@ initsetproctitle(argc, argv, envp)
if (i == 0 || LastArgv + 1 == 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 != NULL && envp[i] != NULL; i++)
{
if (LastArgv + 1 == envp[i])
LastArgv = envp[i] + SPT_ALIGN(strlen(envp[i]), align);
@@ -2654,7 +2657,6 @@ SIGFUNC_DECL
reapchild(sig)
int sig;
{
- int m = 0;
int save_errno = errno;
int st;
pid_t pid;
@@ -2692,7 +2694,6 @@ reapchild(sig)
# endif /* HASWAITPID */
/* Drop PID and check if it was a control socket child */
proc_list_drop(pid, st, NULL);
- CurRunners -= m; /* Update */
}
FIX_SYSV_SIGNAL(sig, reapchild);
errno = save_errno;
@@ -3067,11 +3068,21 @@ static char *DefaultUserShells[] =
# endif /* defined(__svr4__) || defined(__svr5__) */
# ifdef sgi
"/sbin/sh", /* SGI's shells really live in /sbin */
- "/sbin/csh",
+ "/usr/bin/sh",
+ "/sbin/bsh", /* classic borne shell */
+ "/bin/bsh",
+ "/usr/bin/bsh",
+ "/sbin/csh", /* standard csh */
+ "/bin/csh",
+ "/usr/bin/csh",
+ "/sbin/jsh", /* classic borne shell w/ job control*/
+ "/bin/jsh",
+ "/usr/bin/jsh",
"/bin/ksh", /* Korn shell */
"/sbin/ksh",
"/usr/bin/ksh",
- "/bin/tcsh", /* Extended csh */
+ "/sbin/tcsh", /* Extended csh */
+ "/bin/tcsh",
"/usr/bin/tcsh",
# endif /* sgi */
NULL
@@ -3932,7 +3943,7 @@ validate_connection(sap, hostname, e)
hostname, anynet_ntoa(sap));
if (rscheck("check_relay", hostname, anynet_ntoa(sap),
- e, true, true, 3, NULL, NOQID) != EX_OK)
+ e, RSF_RMCOMM|RSF_COUNT, 3, NULL, NOQID) != EX_OK)
{
static char reject[BUFSIZ*2];
extern char MsgBuf[];
@@ -5957,6 +5968,10 @@ char *FFRCompileOptions[] =
/* Steven Pitzl */
"_FFR_NODELAYDSN_ON_HOLD",
#endif /* _FFR_NODELAYDSN_ON_HOLD */
+#if _FFR_NONSTOP_PERSISTENCE
+/* Suggested by Jan Krueger of digitalanswers communications consulting gmbh. */
+ "_FFR_NONSTOP_PERSISTENCE",
+#endif /* _FFR_NONSTOP_PERSISTENCE */
#if _FFR_NO_PIPE
"_FFR_NO_PIPE",
#endif /* _FFR_NO_PIPE */
diff --git a/contrib/sendmail/src/headers.c b/contrib/sendmail/src/headers.c
index efb4f3c821b7..a523a06ff050 100644
--- a/contrib/sendmail/src/headers.c
+++ b/contrib/sendmail/src/headers.c
@@ -15,7 +15,7 @@
/* $FreeBSD$ */
-SM_RCSID("@(#)$Id: headers.c,v 8.266 2001/10/12 01:50:12 gshapiro Exp $")
+SM_RCSID("@(#)$Id: headers.c,v 8.266.4.1 2002/08/16 14:56:01 ca Exp $")
static size_t fix_mime_header __P((char *));
static int priencode __P((char *));
@@ -287,23 +287,27 @@ hse:
if (bitset(pflag, CHHDR_CHECK))
{
- bool stripcom = false;
+ int rscheckflags;
char *rs;
/* no ruleset? look for default */
rs = hi->hi_ruleset;
+ rscheckflags = RSF_COUNT;
+ if (!bitset(hi->hi_flags, H_FROM|H_RCPT))
+ rscheckflags |= RSF_UNSTRUCTURED;
if (rs == NULL)
{
s = stab("*", ST_HEADER, ST_FIND);
if (s != NULL)
{
rs = (&s->s_header)->hi_ruleset;
- stripcom = bitset((&s->s_header)->hi_flags,
- H_STRIPCOMM);
+ if (bitset((&s->s_header)->hi_flags,
+ H_STRIPCOMM))
+ rscheckflags |= RSF_RMCOMM;
}
}
- else
- stripcom = bitset(hi->hi_flags, H_STRIPCOMM);
+ else if (bitset(hi->hi_flags, H_STRIPCOMM))
+ rscheckflags |= RSF_RMCOMM;
if (rs != NULL)
{
int l, k;
@@ -368,7 +372,7 @@ hse:
#endif /* _FFR_HDR_TYPE */
macdefine(&e->e_macro, A_PERM,
macid("{addr_type}"), "h");
- (void) rscheck(rs, fvalue, NULL, e, stripcom, true, 3,
+ (void) rscheck(rs, fvalue, NULL, e, rscheckflags, 3,
NULL, e->e_id);
}
}