From fa47062617aedddbca9cc45fa52e1d4b896d7f2f Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Sun, 21 May 1995 21:09:59 +0000 Subject: [PATCH] * loginpaths.h: Add NetBSD paths * login.c: Define TAB3 to 0 if non existant * krlogin.c (mode): ifdef code based on TABDLY existing on machine. (netbsd lacks this). * krcp.c: Declare sys_errlist only if needed by the OS. * configure.in: Add DECLARE_SYS_ERRLIST Check for libcrypt defining the function crypt git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5835 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/bsd/ChangeLog | 14 ++++++++++++++ src/appl/bsd/configure.in | 2 ++ src/appl/bsd/krcp.c | 2 ++ src/appl/bsd/krlogin.c | 8 ++++++++ src/appl/bsd/login.c | 4 ++++ src/appl/bsd/loginpaths.h | 7 +++++++ 6 files changed, 37 insertions(+) diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 94eb5a8eb..4fd41d7bb 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,17 @@ +Sun May 21 16:36:39 1995 Ezra Peisach + + * loginpaths.h: Add NetBSD paths. + + * login.c: Define TAB3 to 0 if non existant + + * krlogin.c (mode): ifdef code based on TABDLY existing on + machine. (netbsd lacks this). + + * krcp.c: Declare sys_errlist only if needed by the OS. + + * configure.in: Add DECLARE_SYS_ERRLIST + Check for libcrypt defining the function crypt + Mon May 15 10:43:30 1995 * login.c (main): Only try to use TIOCSETD if it is defined diff --git a/src/appl/bsd/configure.in b/src/appl/bsd/configure.in index ae3e9babc..ba442e22a 100644 --- a/src/appl/bsd/configure.in +++ b/src/appl/bsd/configure.in @@ -8,6 +8,7 @@ dnl dbm libs for use of an_to_ln AC_CHECK_LIB(ndbm,main) AC_CHECK_LIB(dbm,main) AC_CHECK_LIB(util,main) +AC_CHECK_LIB(crypt,crypt) dnl dnl AIX has them all; SCO might too LOGINLIBS= @@ -41,6 +42,7 @@ AC_FUNC_CHECK(setlogin,AC_DEFINE(HAVE_SETLOGIN)) AC_FUNC_CHECK(logwtmp,AC_DEFINE(HAVE_LOGWTMP)) AC_HAVE_HEADERS(sys/filio.h sys/sockio.h unistd.h stdlib.h sys/label.h sys/tty.h ttyent.h lastlog.h sys/select.h sys/ptyvar.h) AC_REPLACE_FUNCS(getdtablesize) +DECLARE_SYS_ERRLIST CHECK_SIGNALS CHECK_SETJMP CHECK_DIRENT diff --git a/src/appl/bsd/krcp.c b/src/appl/bsd/krcp.c index 55e261d16..24259e9e2 100644 --- a/src/appl/bsd/krcp.c +++ b/src/appl/bsd/krcp.c @@ -112,7 +112,9 @@ char *colon(); int errs; krb5_sigtype lostconn(); int errno; +#ifdef NEED_SYS_ERRLIST extern char *sys_errlist[]; +#endif int iamremote, targetshouldbedirectory; int iamrecursive; int pflag; diff --git a/src/appl/bsd/krlogin.c b/src/appl/bsd/krlogin.c index b17aed003..d71b8b76c 100644 --- a/src/appl/bsd/krlogin.c +++ b/src/appl/bsd/krlogin.c @@ -163,6 +163,10 @@ krb5_context bsd_context; # define TIOCPKT_WINDOW 0x80 # endif /* TIOCPKT_WINDOW */ +#ifndef ONOCR +#define ONOCR 0 +#endif + #ifdef POSIX_TERMIOS struct termios deftty; #endif @@ -1488,9 +1492,11 @@ mode(f) newtty.c_oflag &= ~(ONLCR|ONOCR); newtty.c_oflag |= (OPOST); } +#ifdef TABDLY /* preserve tab delays, but turn off XTABS */ if ((newtty.c_oflag & TABDLY) == TAB3) newtty.c_oflag &= ~TABDLY; +#endif if (litout) newtty.c_oflag &= ~OPOST; @@ -1565,9 +1571,11 @@ mode(f) sb.c_cc[VMIN] = 1; if (eight) sb.c_iflag &= ~(ISTRIP); +#ifdef TABDLY /* preserve tab delays, but turn off tab-to-space expansion */ if ((sb.c_oflag & TABDLY) == TAB3) sb.c_oflag &= ~TAB3; +#endif /* ** restore current flow control state */ diff --git a/src/appl/bsd/login.c b/src/appl/bsd/login.c index 56e5aca96..ae80134e1 100644 --- a/src/appl/bsd/login.c +++ b/src/appl/bsd/login.c @@ -124,6 +124,10 @@ char copyright[] = #define PRIO_OFFSET 0 #endif +#if !defined(TAB3) +#define TAB3 0 +#endif + #define TTYGRPNAME "tty" /* name of group to own ttys */ #define MOTDFILE "/etc/motd" diff --git a/src/appl/bsd/loginpaths.h b/src/appl/bsd/loginpaths.h index cb51327ba..237b9eb66 100644 --- a/src/appl/bsd/loginpaths.h +++ b/src/appl/bsd/loginpaths.h @@ -81,3 +81,10 @@ #define LPATH "/usr/bin:/usr/dbin:/usr/dbin" #endif #endif + +#ifndef LPATH +#ifdef __NetBSD__ +#define LPATH "/usr/bin:/bin" +#define RPATH "/usr/bin:/bin" +#endif +#endif -- 2.26.2