diff options
author | kaiw <kaiw@FreeBSD.org> | 2014-01-28 19:12:31 +0000 |
---|---|---|
committer | kaiw <kaiw@FreeBSD.org> | 2014-01-28 19:12:31 +0000 |
commit | 9c3c6fdae0b43f1bbd5486754c20e403fc83c3b6 (patch) | |
tree | c000f1bf7a21df619e5cc1ac52b3edc991b884d0 /contrib/sendmail/src/main.c | |
parent | 0fb1cfad9518e33fe20de1d9d694d0d5c2044fa2 (diff) | |
parent | 17e24564634134c9b7145fcf8d1c7d51b93c3182 (diff) | |
download | FreeBSD-src-9c3c6fdae0b43f1bbd5486754c20e403fc83c3b6.zip FreeBSD-src-9c3c6fdae0b43f1bbd5486754c20e403fc83c3b6.tar.gz |
MFH@261240.
Diffstat (limited to 'contrib/sendmail/src/main.c')
-rw-r--r-- | contrib/sendmail/src/main.c | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/contrib/sendmail/src/main.c b/contrib/sendmail/src/main.c index 75c8be1..a5eb50b 100644 --- a/contrib/sendmail/src/main.c +++ b/contrib/sendmail/src/main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2006, 2008, 2009, 2011 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2006, 2008, 2009, 2011 Proofpoint, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -19,14 +19,14 @@ #ifndef lint SM_UNUSED(static char copyright[]) = -"@(#) Copyright (c) 1998-2003 Sendmail, Inc. and its suppliers.\n\ +"@(#) Copyright (c) 1998-2013 Proofpoint, Inc. and its suppliers.\n\ All rights reserved.\n\ Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.\n\ Copyright (c) 1988, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* ! lint */ -SM_RCSID("@(#)$Id: main.c,v 8.983 2013/03/12 15:24:52 ca Exp $") +SM_RCSID("@(#)$Id: main.c,v 8.988 2013/11/23 02:52:37 gshapiro Exp $") #if NETINET || NETINET6 @@ -77,17 +77,19 @@ static SIGFUNC_DECL sigusr1 __P((int)); ** (11/88 - 9/89). ** UCB/Mammoth Project (10/89 - 7/95). ** InReference, Inc. (8/95 - 1/97). -** Sendmail, Inc. (1/98 - present). +** Sendmail, Inc. (1/98 - 9/13). ** The support of my employers is gratefully acknowledged. ** Few of them (Britton-Lee in particular) have had ** anything to gain from my involvement in this project. ** ** Gregory Neil Shapiro, ** Worcester Polytechnic Institute (until 3/98). -** Sendmail, Inc. (3/98 - present). +** Sendmail, Inc. (3/98 - 10/13). +** Proofpoint, Inc. (10/13 - present). ** ** Claus Assmann, -** Sendmail, Inc. (12/98 - present). +** Sendmail, Inc. (12/98 - 10/13). +** Proofpoint, Inc. (10/13 - present). */ char *FullName; /* sender's full name */ @@ -4484,6 +4486,25 @@ testmodeline(line, e) (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, "ul = %lu\n", ul); } +#if NETINET || NETINET6 + else if (sm_strcasecmp(&line[1], "gethostbyname") == 0) + { + int family = AF_INET; + + q = strpbrk(p, " \t"); + if (q != NULL) + { + while (isascii(*q) && isspace(*q)) + *q++ = '\0'; +# if NETINET6 + if (*q != '\0' && (strcmp(q, "inet6") == 0 || + strcmp(q, "AAAA") == 0)) + family = AF_INET6; +# endif /* NETINET6 */ + } + (void) sm_gethostbyname(p, family); + } +#endif /* NETINET || NETINET6 */ else { (void) sm_io_fprintf(smioout, SM_TIME_DEFAULT, |