Subject: bin/1476: Additional diffs for sendmail-8.7
To: None <gnats-bugs@gnats.netbsd.org>
From: Bernd Ernesti <bernd@arresum.inka.de>
List: netbsd-bugs
Date: 09/19/1995 10:33:12
>Number:         1476
>Category:       bin
>Synopsis:       Additional diffs for sendmail-8.7
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          support
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 19 04:50:01 1995
>Last-Modified:
>Originator:     Bernd Ernesti
>Organization:
	
>Release:        NetBSD-current 16-Sep-95
>Environment:
	
System: NetBSD arresum 1.0A NetBSD 1.0A (VEEGO) #219: Sat Sep 16 21:09:41 MET DST 1995 bernd@arresum:/src/sys/arch/amiga/compile/VEEGO amiga


>Description:
	sendmail 8.7 is now released and it needs some small patches which
	where done for 8.6.12 in the NetBSD source tree
	I use the 8.7.beta prereleases since mid august without a problem
>How-To-Repeat:
>Fix:
	Use all files from sendmail-8.7.tar.gz and apply this diff:

*** Makefile-orig	Mon May 29 18:27:37 1995
--- Makefile	Tue Sep 19 09:59:38 1995
***************
*** 2,7 ****
--- 2,12 ----
  
  VER=	XX
  SUBDIR= src mailstats makemap praliases cf/cf
+ 
+ .if make(install)
+ SUBDIR+= doc/intro doc/op
+ .endif
+ 
  FTPDIR=	mastodon:/disks/barad-dur/ftp/sendmail/.
  DISTFILES=sendmail.${VER}.tar.Z sendmail.${VER}.tar.gz \
  	RELEASE_NOTES FAQ KNOWNBUGS
*** cf/cf/Makefile-orig	Wed Sep 13 02:06:03 1995
--- cf/cf/Makefile	Tue Sep 19 10:00:18 1995
***************
*** 31,37 ****
  		cs-sunos4.1.cf cs-ultrix4.cf \
  	s2k-osf1.cf s2k-ultrix4.cf \
  	chez.cs.cf huginn.cs.cf mail.cs.cf mail.eecs.cf mailspool.cs.cf \
! 		python.cs.cf ucbarpa.cf ucbvax.cf vangogh.cs.cf
  
  all: $(ALL)
  
--- 31,37 ----
  		cs-sunos4.1.cf cs-ultrix4.cf \
  	s2k-osf1.cf s2k-ultrix4.cf \
  	chez.cs.cf huginn.cs.cf mail.cs.cf mail.eecs.cf mailspool.cs.cf \
! 		python.cs.cf ucbarpa.cf ucbvax.cf vangogh.cs.cf sun-lamp.cf
  
  all: $(ALL)
  
*** /dev/null	Tue Sep 19 09:49:59 1995
--- cf/cf/sun-lamp.mc	Tue Sep 19 10:16:00 1995
***************
*** 0 ****
--- 1,39 ----
+ divert(-1)
+ #
+ # Copyright (c) 1983 Eric P. Allman
+ # Copyright (c) 1988, 1993
+ #	The Regents of the University of California.  All rights reserved.
+ #
+ # Redistribution and use in source and binary forms, with or without
+ # modification, are permitted provided that the following conditions
+ # are met:
+ # 1. Redistributions of source code must retain the above copyright
+ #    notice, this list of conditions and the following disclaimer.
+ # 2. Redistributions in binary form must reproduce the above copyright
+ #    notice, this list of conditions and the following disclaimer in the
+ #    documentation and/or other materials provided with the distribution.
+ # 3. All advertising materials mentioning features or use of this software
+ #    must display the following acknowledgement:
+ #	This product includes software developed by the University of
+ #	California, Berkeley and its contributors.
+ # 4. Neither the name of the University nor the names of its contributors
+ #    may be used to endorse or promote products derived from this software
+ #    without specific prior written permission.
+ #
+ # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ # ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ # SUCH DAMAGE.
+ #
+ 
+ VERSIONID(`@(#)sun-lamp.mc	$Revision: 1.0 $')
+ OSTYPE(bsd4.4)dnl
+ MAILER(local)dnl
+ MAILER(smtp)dnl
*** makemap/Makefile-orig	Mon Jun  7 19:22:35 1993
--- makemap/Makefile	Tue Sep 19 10:01:50 1995
***************
*** 1,7 ****
  #	@(#)Makefile	8.1 (Berkeley) 6/7/93
  
  PROG=	makemap
! MAN8=	makemap.0
  CFLAGS+=-I${.CURDIR}/../src -DNDBM -DNEWDB
  
  .include "../../Makefile.inc"
--- 1,7 ----
  #	@(#)Makefile	8.1 (Berkeley) 6/7/93
  
  PROG=	makemap
! MAN=	makemap.8
  CFLAGS+=-I${.CURDIR}/../src -DNDBM -DNEWDB
  
  .include "../../Makefile.inc"
*** src/Makefile-orig	Mon Jul  3 02:27:51 1995
--- src/Makefile	Tue Sep 19 10:03:56 1995
***************
*** 15,21 ****
  # databases are read, but the new format will be used on any rebuilds.  On
  # really gnarly systems, you can set this to null; it will crawl like a high
  # spiral snail, but it will work.
! DBMDEF=	-DNEWDB -DNDBM
  
  CFLAGS+=-I${.CURDIR} ${DBMDEF} -DNETISO
  
--- 15,21 ----
  # databases are read, but the new format will be used on any rebuilds.  On
  # really gnarly systems, you can set this to null; it will crawl like a high
  # spiral snail, but it will work.
! DBMDEF=	-DNEWDB -DNIS
  
  CFLAGS+=-I${.CURDIR} ${DBMDEF} -DNETISO
  
***************
*** 26,40 ****
  	util.c version.c
  DPADD=	
  LDADD=	
! MAN1=	mailq.0 newaliases.0
! MAN5=	aliases.0
! MAN8=	sendmail.0 
  LINKS=	/usr/sbin/sendmail /usr/bin/newaliases \
  	/usr/sbin/sendmail /usr/bin/mailq
  BINDIR=	/usr/sbin
  BINOWN=	root
! BINGRP=	kmem
! BINMODE=6555
  
  beforeinstall:
  #	install -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
--- 26,37 ----
  	util.c version.c
  DPADD=	
  LDADD=	
! MAN=	mailq.1 newaliases.1 aliases.5 sendmail.8
  LINKS=	/usr/sbin/sendmail /usr/bin/newaliases \
  	/usr/sbin/sendmail /usr/bin/mailq
  BINDIR=	/usr/sbin
  BINOWN=	root
! BINMODE=4555
  
  beforeinstall:
  #	install -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
*** src/Makefiles/Makefile.NetBSD-orig	Wed Sep 13 17:29:03 1995
--- src/Makefiles/Makefile.NetBSD	Tue Sep 19 10:04:51 1995
***************
*** 17,34 ****
  # spiral snail, but it will work.
  DBMDEF=	-DNEWDB -DNIS
  
! #nasty warning about gcc 2.4.x caused bugs 
! CFLAGS=-I${.CURDIR} ${DBMDEF} -DNETISO
! #CFLAGS+=-I${.CURDIR} ${DBMDEF} -DNETISO
  
  SRCS=	alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
  	deliver.c domain.c envelope.c err.c headers.c macro.c main.c map.c \
  	mci.c mime.c parseaddr.c queue.c readcf.c recipient.c savemail.c \
  	srvrsmtp.c stab.c stats.c sysexits.c trace.c udb.c usersmtp.c \
  	util.c version.c
! MAN1=	mailq.0 newaliases.0
! MAN5=	aliases.0
! MAN8=	sendmail.0 
  LINKS=	/usr/sbin/sendmail /usr/bin/newaliases \
  	/usr/sbin/sendmail /usr/bin/mailq
  INSTALL=install
--- 17,30 ----
  # spiral snail, but it will work.
  DBMDEF=	-DNEWDB -DNIS
  
! CFLAGS+=-I${.CURDIR} ${DBMDEF} -DNETISO
  
  SRCS=	alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
  	deliver.c domain.c envelope.c err.c headers.c macro.c main.c map.c \
  	mci.c mime.c parseaddr.c queue.c readcf.c recipient.c savemail.c \
  	srvrsmtp.c stab.c stats.c sysexits.c trace.c udb.c usersmtp.c \
  	util.c version.c
! MAN=	mailq.1 newaliases.1 aliases.5 sendmail.8
  LINKS=	/usr/sbin/sendmail /usr/bin/newaliases \
  	/usr/sbin/sendmail /usr/bin/mailq
  INSTALL=install
*** src/daemon.c-orig	Sun Aug 27 15:31:56 1995
--- src/daemon.c	Tue Sep 19 10:07:20 1995
***************
*** 673,687 ****
  
  	if (host[0] == '[')
  	{
- 		long hid;
  		register char *p = strchr(host, ']');
  
  		if (p != NULL)
  		{
  			*p = '\0';
  #if NETINET
! 			hid = inet_addr(&host[1]);
! 			if (hid == -1)
  #endif
  			{
  				/* try it as a host name (avoid MX lookup) */
--- 673,685 ----
  
  	if (host[0] == '[')
  	{
  		register char *p = strchr(host, ']');
  
  		if (p != NULL)
  		{
  			*p = '\0';
  #if NETINET
! 			if (inet_aton(&host[1], &addr.sin.sin_addr) == 0)
  #endif
  			{
  				/* try it as a host name (avoid MX lookup) */
***************
*** 713,719 ****
  		}
  #if NETINET
  		addr.sin.sin_family = AF_INET;		/*XXX*/
- 		addr.sin.sin_addr.s_addr = hid;
  #endif
  	}
  	else
--- 711,716 ----
***************
*** 1445,1451 ****
  	if ((cp = strchr(name, ']')) == NULL)
  		return (NULL);
  	*cp = '\0';
! 	in_addr.s_addr = inet_addr(&name[1]);
  
  	/* nope -- ask the name server */
  	hp = sm_gethostbyaddr((char *)&in_addr, INADDRSZ, AF_INET);
--- 1442,1448 ----
  	if ((cp = strchr(name, ']')) == NULL)
  		return (NULL);
  	*cp = '\0';
! 	(void) inet_aton(&name[1], &in_addr);
  
  	/* nope -- ask the name server */
  	hp = sm_gethostbyaddr((char *)&in_addr, INADDRSZ, AF_INET);
*** src/domain.c-orig	Thu Aug 24 18:44:30 1995
--- src/domain.c	Tue Sep 19 10:08:14 1995
***************
*** 339,351 ****
  		if (host[0] == '[')
  		{
  			register char *p;
  
  			/* this may be an MX suppression-style address */
  			p = strchr(MXHostBuf, ']');
  			if (p != NULL)
  			{
  				*p = '\0';
! 				if (inet_addr(&MXHostBuf[1]) != -1)
  					*p = ']';
  				else
  				{
--- 339,352 ----
  		if (host[0] == '[')
  		{
  			register char *p;
+ 			struct in_addr junk;
  
  			/* this may be an MX suppression-style address */
  			p = strchr(MXHostBuf, ']');
  			if (p != NULL)
  			{
  				*p = '\0';
! 				if (inet_aton(&MXHostBuf[1], &junk) != 0)
  					*p = ']';
  				else
  				{

>Audit-Trail:
>Unformatted: