From 048f3c3a11405d77cd183778c62e808af43a1745 Mon Sep 17 00:00:00 2001 From: gshapiro Date: Sat, 1 Feb 2014 22:27:40 +0000 Subject: MFC: Merge sendmail 8.14.8 --- contrib/sendmail/src/main.c | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) (limited to 'contrib/sendmail/src/main.c') 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, -- cgit v1.1