Apply this patch to update an 8.6 sendmail to 8.6.1.

*** KNOWNBUGS.OLD	Fri Oct  8 16:17:06 1993
--- KNOWNBUGS	Fri Oct  8 16:16:43 1993
***************
*** 3,11 ****
  	     K N O W N   B U G S   I N   S E N D M A I L
  			     (for 8.6)
  
- 			   8.5 (10/5/93)
  
- 
  The following are bugs or deficiencies in sendmail that I am aware of
  but which have not been fixed in the current release.  You probably
  want to get the most up to date version of this from FTP.CS.Berkeley.EDU
--- 3,9 ----
***************
*** 38,40 ****
--- 36,53 ----
  
    Sometimes identical, duplicate error messages can be generated.  As
    near as I can tell, this is rare and relatively innocuous.
+ 
+ * If you EXPN a list or user that has a program mailer, the output of
+   EXPN will include ``@local.host.name''.  You can't actually mail to
+   this address.  It's not clear what the right behaviour is in this
+   circumstance.
+ 
+ * You can't use a ``mailer:relay.host'' for UUCP_RELAY or the relay
+   host in the SITECONFIG macro (the second argument) in the
+   configurations.  If the goal is to use ESMTP instead of SMTP,
+   define `confRELAY_MAILER' to `esmtp' and use no mailer name.  Note
+   that the default mailer used for relays (`relay') does use ESMTP
+   by default (it didn't in prior releases).  This problem does not
+   occur for other relays (BITNET or CSNET) or mailertable entries.
+ 
+ (Version 8.7, last updated 10/8/93)
*** RELEASE_NOTES.OLD	Fri Oct  8 15:57:52 1993
--- RELEASE_NOTES	Fri Oct  8 15:57:29 1993
***************
*** 1,3 ****
--- 1,9 ----
+ 8.6.1/8.6	93/10/08
+ 	Portability fixes for A/UX and Encore UMAX V.
+ 	Fix error message handling -- if you had a name server down
+ 		causing an error during parsing, that message was never
+ 		propogated to the queue file.
+ 
  8.6/8.6		93/10/05
  	Configuration cleanup: make it easier to undo IDENTPROTO in
  		conf.h (other systems have the same bug).
*** src/READ_ME.OLD	Fri Oct  8 15:59:58 1993
--- src/READ_ME	Fri Oct  8 16:01:23 1993
***************
*** 30,36 ****
  # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  # SUCH DAMAGE.
  #
! #	@(#)READ_ME	8.27 (Berkeley) 10/5/93
  #
  
  This directory contains the source files for sendmail.
--- 30,36 ----
  # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  # SUCH DAMAGE.
  #
! #	@(#)READ_ME	8.28 (Berkeley) 10/8/93
  #
  
  This directory contains the source files for sendmail.
***************
*** 134,139 ****
--- 134,140 ----
  		If this is not set, use POSIX/BSD semantics, where the
  		signal handler stays in force until an exec or an
  		explicit delete.  Implied by SYSTEM5.
+ SYS5SETPGRP	Use System V setpgrp() semantics.  Implied by SYSTEM5.
  HASFLOCK	Set this if you prefer to use the flock(2) system call
  		rather than using fcntl-based locking.  Fcntl locking
  		has some semantic gotchas, but many vendor systems
***************
*** 433,436 ****
  
  Eric Allman
  
! (Version 8.27, last update 10/5/93 13:15:38)
--- 434,437 ----
  
  Eric Allman
  
! (Version 8.28, last update 10/8/93 16:01:04)
*** src/conf.c.OLD	Fri Oct  8 15:56:27 1993
--- src/conf.c	Fri Oct  8 15:55:04 1993
***************
*** 33,39 ****
   */
  
  #ifndef lint
! static char sccsid[] = "@(#)conf.c	8.39 (Berkeley) 9/30/93";
  #endif /* not lint */
  
  # include "sendmail.h"
--- 33,39 ----
   */
  
  #ifndef lint
! static char sccsid[] = "@(#)conf.c	8.40 (Berkeley) 10/8/93";
  #endif /* not lint */
  
  # include "sendmail.h"
***************
*** 587,592 ****
--- 587,609 ----
  {
  }
  /*
+ **  INIT_MD -- do machine dependent initializations
+ **
+ **	Systems that have global modes that should be set should do
+ **	them here rather than in main.
+ */
+ 
+ #ifdef _AUX_SOURCE
+ # include	<compat.h>
+ #endif
+ 
+ init_md()
+ {
+ #ifdef _AUX_SOURCE
+ 	setcompat(getcompat() | COMPAT_BSDPROT);
+ #endif
+ }
+ /*
  **  GETLA -- get the current load average
  **
  **	This code stolen from la.c.
***************
*** 1165,1171 ****
  		(void) close(fd);
  	}
  #endif /* TIOCNOTTY */
! # ifdef SYSTEM5
  	return setpgrp();
  # else
  	return setpgid(0, getpid());
--- 1182,1188 ----
  		(void) close(fd);
  	}
  #endif /* TIOCNOTTY */
! # ifdef SYS5SETPGRP
  	return setpgrp();
  # else
  	return setpgid(0, getpid());
***************
*** 1324,1330 ****
  #endif
  
  #ifdef HASSTATFS
! # if defined(IRIX) || defined(apollo) || defined(_SCO_unix_)
  #  include <sys/statfs.h>
  # else
  #  if (defined(sun) && !defined(BSD)) || defined(__hpux) || defined(_CONVEX_SOURCE) || defined(NeXT) || defined(_AUX_SOURCE)
--- 1341,1347 ----
  #endif
  
  #ifdef HASSTATFS
! # if defined(IRIX) || defined(apollo) || defined(_SCO_unix_) || defined(UMAXV)
  #  include <sys/statfs.h>
  # else
  #  if (defined(sun) && !defined(BSD)) || defined(__hpux) || defined(_CONVEX_SOURCE) || defined(NeXT) || defined(_AUX_SOURCE)
***************
*** 1364,1370 ****
  # if defined(HASUSTAT)
  	if (stat(dir, &statbuf) == 0 && ustat(statbuf.st_dev, &fs) == 0)
  # else
! #  if defined(IRIX) || defined(apollo)
  	if (statfs(dir, &fs, sizeof fs, 0) == 0)
  #  else
  #   if defined(ultrix)
--- 1381,1387 ----
  # if defined(HASUSTAT)
  	if (stat(dir, &statbuf) == 0 && ustat(statbuf.st_dev, &fs) == 0)
  # else
! #  if defined(IRIX) || defined(apollo) || defined(UMAXV)
  	if (statfs(dir, &fs, sizeof fs, 0) == 0)
  #  else
  #   if defined(ultrix)
*** src/conf.h.OLD	Fri Oct  8 15:55:34 1993
--- src/conf.h	Fri Oct  8 15:54:59 1993
***************
*** 31,37 ****
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   *
!  *	@(#)conf.h	8.36 (Berkeley) 9/22/93
   */
  
  /*
--- 31,37 ----
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   *
!  *	@(#)conf.h	8.37 (Berkeley) 10/8/93
   */
  
  /*
***************
*** 39,44 ****
--- 39,45 ----
  */
  
  # include <sys/param.h>
+ # include <sys/types.h>
  # include <sys/stat.h>
  # include <sys/file.h>
  # include <sys/wait.h>
***************
*** 396,402 ****
--- 397,426 ----
  #endif
  
  
+ /*
+ **  Encore UMAX V
+ **
+ **	Not extensively tested.
+ */
  
+ #ifdef UMAXV
+ # include <limits.h>
+ # define HASUNAME	1	/* use System V uname(2) system call */
+ # define HASSTATFS	1	/* has the statfs(2) syscall */
+ # define HASSETVBUF	1	/* we have setvbuf(3) in libc */
+ # define HASINITGROUPS	1	/* has initgroups(3) call */
+ # define SYS5SIGNALS	1	/* SysV signal semantics -- reset on each sig */
+ # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
+ # define FORK		fork	/* no vfork(2) primitive available */
+ # define MAXPATHLEN	PATH_MAX
+ extern struct passwd	*getpwent(), *getpwnam(), *getpwuid();
+ extern struct group	*getgrent(), *getgrnam(), *getgrgid();
+ # undef WIFEXITED
+ # undef WEXITSTATUS
+ #endif
+ 
+ 
+ 
  /**********************************************************************
  **  End of Per-Operating System defines
  **********************************************************************/
***************
*** 417,422 ****
--- 441,447 ----
  # ifdef SYSTEM5
  # define HASUNAME	1	/* use System V uname(2) system call */
  # define HASUSTAT	1	/* use System V ustat(2) syscall */
+ # define SYS5SETPGRP	1	/* use System V setpgrp(2) syscall */
  # ifndef LA_TYPE
  #  define LA_TYPE	LA_INT
  # endif
*** src/deliver.c.OLD	Fri Oct  8 15:56:00 1993
--- src/deliver.c	Fri Oct  8 15:55:02 1993
***************
*** 33,39 ****
   */
  
  #ifndef lint
! static char sccsid[] = "@(#)deliver.c	8.29 (Berkeley) 10/3/93";
  #endif /* not lint */
  
  #include "sendmail.h"
--- 33,39 ----
   */
  
  #ifndef lint
! static char sccsid[] = "@(#)deliver.c	8.30 (Berkeley) 10/8/93";
  #endif /* not lint */
  
  #include "sendmail.h"
***************
*** 434,444 ****
  
  	e->e_nsent = 0;
  	e->e_flags |= EF_GLOBALERRS;
- 
- 	/* be sure to use any new error message */
- 	if (e->e_message != NULL)
- 		free(e->e_message);
- 	e->e_message = NULL;
  
  	/* now run through the queue */
  	for (q = e->e_sendqueue; q != NULL; q = q->q_next)
--- 434,439 ----
*** src/main.c.OLD	Fri Oct  8 15:55:23 1993
--- src/main.c	Fri Oct  8 15:54:59 1993
***************
*** 39,45 ****
  #endif /* not lint */
  
  #ifndef lint
! static char sccsid[] = "@(#)main.c	8.28 (Berkeley) 9/25/93";
  #endif /* not lint */
  
  #define	_DEFINE
--- 39,45 ----
  #endif /* not lint */
  
  #ifndef lint
! static char sccsid[] = "@(#)main.c	8.29 (Berkeley) 10/8/93";
  #endif /* not lint */
  
  #define	_DEFINE
***************
*** 165,170 ****
--- 165,173 ----
  		abort();
  	}
  	reenter = TRUE;
+ 
+ 	/* do machine-dependent initializations */
+ 	init_md();
  
  	/* in 4.4BSD, the table can be huge; impose a reasonable limit */
  	DtableSize = getdtsize();
*** src/queue.c.OLD	Fri Oct  8 15:56:18 1993
--- src/queue.c	Fri Oct  8 15:55:04 1993
***************
*** 36,44 ****
  
  #ifndef lint
  #ifdef QUEUE
! static char sccsid[] = "@(#)queue.c	8.19 (Berkeley) 9/26/93 (with queueing)";
  #else
! static char sccsid[] = "@(#)queue.c	8.19 (Berkeley) 9/26/93 (without queueing)";
  #endif
  #endif /* not lint */
  
--- 36,44 ----
  
  #ifndef lint
  #ifdef QUEUE
! static char sccsid[] = "@(#)queue.c	8.20 (Berkeley) 10/8/93 (with queueing)";
  #else
! static char sccsid[] = "@(#)queue.c	8.20 (Berkeley) 10/8/93 (without queueing)";
  #endif
  #endif /* not lint */
  
***************
*** 1061,1067 ****
  			break;
  
  		  case 'M':		/* message */
! 			e->e_message = newstr(&bp[1]);
  			break;
  
  		  case 'S':		/* sender */
--- 1061,1067 ----
  			break;
  
  		  case 'M':		/* message */
! 			/* ignore this; we want a new message next time */
  			break;
  
  		  case 'S':		/* sender */
***************
*** 1401,1408 ****
  			{
  				if (errno == EEXIST)
  					continue;
! 				syserr("queuename: Cannot create \"%s\" in \"%s\"",
! 					qf, QueueDir);
  				exit(EX_UNAVAILABLE);
  			}
  			if (lockfile(i, qf, NULL, LOCK_EX|LOCK_NB))
--- 1401,1408 ----
  			{
  				if (errno == EEXIST)
  					continue;
! 				syserr("queuename: Cannot create \"%s\" in \"%s\" (euid=%d)",
! 					qf, QueueDir, geteuid());
  				exit(EX_UNAVAILABLE);
  			}
  			if (lockfile(i, qf, NULL, LOCK_EX|LOCK_NB))
***************
*** 1416,1423 ****
  		}
  		if (c1 >= '~' && c2 >= 'Z')
  		{
! 			syserr("queuename: Cannot create \"%s\" in \"%s\"",
! 				qf, QueueDir);
  			exit(EX_OSERR);
  		}
  		e->e_id = newstr(&qf[2]);
--- 1416,1423 ----
  		}
  		if (c1 >= '~' && c2 >= 'Z')
  		{
! 			syserr("queuename: Cannot create \"%s\" in \"%s\" (euid=%d)",
! 				qf, QueueDir, geteuid());
  			exit(EX_OSERR);
  		}
  		e->e_id = newstr(&qf[2]);
*** src/version.c.OLD	Fri Oct  8 15:55:46 1993
--- src/version.c	Fri Oct  8 15:55:00 1993
***************
*** 33,39 ****
   */
  
  #ifndef lint
! static char sccsid[] = "@(#)version.c	8.6 (Berkeley) 10/5/93";
  #endif /* not lint */
  
! char	Version[] = "8.6";
--- 33,39 ----
   */
  
  #ifndef lint
! static char sccsid[] = "@(#)version.c	8.6.1.1 (Berkeley) 10/8/93";
  #endif /* not lint */
  
! char	Version[] = "8.6.1";
