*** appl/bsd/login.c.ORIG	Fri Feb  6 19:41:18 1998
--- appl/bsd/login.c	Tue Jun 30 19:46:01 1998
***************
*** 205,210 ****
--- 205,214 ----
  #endif
  #endif
  
+ #ifdef HAVE_PATHS_H
+ #include <paths.h>
+ #endif
+ 
  #include "loginpaths.h"
  
  #ifdef POSIX_TERMIOS
***************
*** 232,243 ****
  
  #define	TTYGRPNAME	"tty"		/* name of group to own ttys */
  
  #define	MOTDFILE	"/etc/motd"
- #define	MAILDIR		"/usr/spool/mail"
- #define	NOLOGIN		"/etc/nologin"
  #define	HUSHLOGIN	".hushlogin"
- #define	LASTLOG		"/usr/adm/lastlog"
- #define	BSHELL		"/bin/sh"
  
  #if !defined(OQUOTA) && !defined(QUOTAWARN)
  #define QUOTAWARN	"/usr/ucb/quota" /* warn user about quotas */
--- 236,268 ----
  
  #define	TTYGRPNAME	"tty"		/* name of group to own ttys */
  
+ #if defined(_PATH_MAILDIR)
+ #define MAILDIR		_PATH_MAILDIR
+ #else
+ #define MAILDIR		"/usr/spool/mail"
+ #endif
+ #if defined(_PATH_NOLOGIN)
+ #define NOLOGIN		_PATH_NOLOGIN
+ #else
+ #define NOLOGIN		"/etc/nologin"
+ #endif
+ #if defined(_PATH_LASTLOG)
+ #define LASTLOG		_PATH_LASTLOG
+ #else
+ #define LASTLOG		"/usr/adm/lastlog"
+ #endif
+ #if defined(_PATH_BSHELL)
+ #define BSHELL		_PATH_BSHELL
+ #else
+ #define BSHELL		"/bin/sh"
+ #endif
+ 
+ #if (defined(BSD) && (BSD >= 199103))		/* no /usr/ucb */
+ #define QUOTAWARN	"/usr/bin/quota"
+ #endif
+ 
  #define	MOTDFILE	"/etc/motd"
  #define	HUSHLOGIN	".hushlogin"
  
  #if !defined(OQUOTA) && !defined(QUOTAWARN)
  #define QUOTAWARN	"/usr/ucb/quota" /* warn user about quotas */
***************
*** 1388,1394 ****
  		if (pwd == NULL || pwd->pw_uid)
  			checknologin();
  
- 
  		/*
  		 * Allows automatic login by root.
  		 * If not invoked by root, disallow if the uid's differ.
--- 1413,1418 ----
***************
*** 1521,1527 ****
  #endif
  		else
  			syslog(LOG_ERR, "ROOT LOGIN REFUSED ON %s", tty);
! 		printf("Login incorrect\n");
  		sleepexit(1);
  	}
  
--- 1545,1551 ----
  #endif
  		else
  			syslog(LOG_ERR, "ROOT LOGIN REFUSED ON %s", tty);
! 		printf("Permission denied.\n");
  		sleepexit(1);
  	}
  
***************
*** 2187,2193 ****
  	int quiet;
  	char *tty;
  {
! #ifdef HAVE_LASTLOG_H
  	struct lastlog ll;
  	int fd;
  
--- 2211,2217 ----
  	int quiet;
  	char *tty;
  {
! #if defined(HAVE_LASTLOG_H) || (defined(BSD) && (BSD >= 199103))
  	struct lastlog ll;
  	int fd;

