login.c (main): Only try to use TIOCSETD if it is defined
authorTheodore Tso <tytso@mit.edu>
Sat, 20 May 1995 02:07:27 +0000 (02:07 +0000)
committerTheodore Tso <tytso@mit.edu>
Sat, 20 May 1995 02:07:27 +0000 (02:07 +0000)
(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
src/appl/bsd/krcp.c
src/appl/bsd/login.c

index b76b2712c4ca989abdce6bb2b8e92487caf22c82..94eb5a8ebe21313636b34d16520a7e313d058b71 100644 (file)
@@ -1,3 +1,13 @@
+Mon May 15 10:43:30 1995    <tytso@rsx-11.mit.edu>
+
+       * 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  <epeisach@kangaroo.mit.edu>
 
        * krshd.c (recvauth): Use krb5_auth_con_genaddrs to set the port
index 5191fe186b7ddb36f0b008232d5c07aeacbfac56..55e261d161cfee6dd47dc97fab3e139e3966672f 100644 (file)
@@ -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
index 4d618e6dbee63322d9cc15fbfaf95cf7ef842723..56e5aca96da656cf1d6aeac7e18ee0bec93a3cbc 100644 (file)
@@ -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;