From b3ba0228d763434360602434f7fad3646859b5b5 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Sat, 20 May 1995 02:07:27 +0000 Subject: [PATCH] login.c (main): Only try to use TIOCSETD if it is defined (instead of relying on _IBMR2 *not* being defined). Only try to use TIOCNXCL if it is defined. krcp.c: If setreuid() is emulated using setresuid(), #define HAVE_SETREUID so it gets used. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5825 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/bsd/ChangeLog | 10 ++++++++++ src/appl/bsd/krcp.c | 1 + src/appl/bsd/login.c | 6 ++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index b76b2712c..94eb5a8eb 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,13 @@ +Mon May 15 10:43:30 1995 + + * login.c (main): Only try to use TIOCSETD if it is defined + (instead of relying on _IBMR2 *not* being defined). + + Only try to use TIOCNXCL if it is defined. + + * krcp.c: If setreuid() is emulated using setresuid(), + #define HAVE_SETREUID so it gets used. + Sat May 13 08:59:38 1995 Ezra Peisach * krshd.c (recvauth): Use krb5_auth_con_genaddrs to set the port diff --git a/src/appl/bsd/krcp.c b/src/appl/bsd/krcp.c index 5191fe186..55e261d16 100644 --- a/src/appl/bsd/krcp.c +++ b/src/appl/bsd/krcp.c @@ -60,6 +60,7 @@ char copyright[] = #ifdef HAVE_SETRESUID #ifndef HAVE_SETREUID +#define HAVE_SETREUID #define setreuid(r,e) setresuid(r,e,-1) #endif #endif diff --git a/src/appl/bsd/login.c b/src/appl/bsd/login.c index 4d618e6db..56e5aca96 100644 --- a/src/appl/bsd/login.c +++ b/src/appl/bsd/login.c @@ -401,7 +401,9 @@ int main(argc, argv) /* linux, sco don't have this line discipline interface */ (void)ioctl(0, TIOCLSET, (char *)&ioctlval); #endif +#ifdef TIOCNXCL (void)ioctl(0, TIOCNXCL, (char *)0); +#endif (void)fcntl(0, F_SETFL, ioctlval); #endif @@ -517,7 +519,7 @@ int main(argc, argv) #endif int read_long_pw_string(); #endif /* KRB4 */ -#if !defined(_IBMR2) +#if defined(TIOCSETD) ioctlval = 0; (void)ioctl(0, TIOCSETD, (char *)&ioctlval); #endif @@ -827,7 +829,7 @@ bad_login: if (*pwd->pw_shell == '\0') pwd->pw_shell = BSHELL; -#if defined(NTTYDISC) && !defined(_IBMR2) +#if defined(NTTYDISC) && defined(TIOCSETD) /* turn on new line discipline for the csh */ else if (!strcmp(pwd->pw_shell, "/bin/csh")) { ioctlval = NTTYDISC; -- 2.26.2