From fc0d0368b1043a5329ee4bab2bf9cf727ba22444 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Thu, 10 Aug 1995 01:16:38 +0000 Subject: [PATCH] DDon't call vhangup() on Ultrix until after session. This actually turns out to be secure git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6495 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/pty/ChangeLog | 5 +++++ src/util/pty/configure.in | 4 ++++ src/util/pty/pty-int.h | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/util/pty/ChangeLog b/src/util/pty/ChangeLog index a924884ae..cb95266bd 100644 --- a/src/util/pty/ChangeLog +++ b/src/util/pty/ChangeLog @@ -1,5 +1,10 @@ Wed Aug 9 00:16:40 1995 Sam Hartman + * pty-int.h (VHANG_first): Change defines so VHANG_FIRST doesn't + get defined under Ultrix because Ultrix can only establish + controlling terminal once per process and we need to get + controlling terminal again after vhangup(). + * getpty.c (pty_getpty): Use the right test for slave buffer length. Tue Aug 8 22:20:33 1995 Tom Yu diff --git a/src/util/pty/configure.in b/src/util/pty/configure.in index 9282a99a4..cdb8f55cc 100644 --- a/src/util/pty/configure.in +++ b/src/util/pty/configure.in @@ -14,6 +14,10 @@ dnl Make our operating system-specific security checks and definitions for dnl login. dnl case $krb5_cv_host in +*-*-ultrix*) +AC_DEFINE([OPEN_CTTY_ONLY_ONCE],[1]) +;; + *-*-aix3*) # AIX has streams include files but not streams TTY # Moreover, strops.h trashes sys/ioctl.h krb5_cv_has_streams=no diff --git a/src/util/pty/pty-int.h b/src/util/pty/pty-int.h index 2bd450c61..8d5d1aeb8 100644 --- a/src/util/pty/pty-int.h +++ b/src/util/pty/pty-int.h @@ -84,8 +84,8 @@ #endif #endif -#if defined(HAVE_VHANGUP) -#define VHANG_first /* may not work under Ultrix*/ +#if defined(HAVE_VHANGUP) && !defined(OPEN_CTTY_ONLY_ONCE) +#define VHANG_first /* Breaks under Ultrix and others where you cannot get controlling terminal twice.*/ #define VHANG_LAST #endif -- 2.26.2