From: Sam Hartman Date: Mon, 19 Jun 1995 18:23:26 +0000 (+0000) Subject: Make sure processes associated with the terminal are actually X-Git-Tag: krb5-1.0-beta6~1719 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d8dd7e9b0c5ae5f4c0377a01beab78653421819c;p=krb5.git Make sure processes associated with the terminal are actually dead before re-using the pty. This is a temporary fix; the real fix will make sure that the processes get a HUP when telnetd dies and will be part of the libpty changes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6094 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/telnet/telnetd/ChangeLog b/src/appl/telnet/telnetd/ChangeLog index 6cc7cf109..b873243b3 100644 --- a/src/appl/telnet/telnetd/ChangeLog +++ b/src/appl/telnet/telnetd/ChangeLog @@ -1,4 +1,3 @@ - Thu Jun 15 17:43:21 EDT 1995 Paul Park (pjpark@mit.edu) * Makefile.in - Change explicit library names to -l form, and change target link line to use $(LD) and associated flags. @@ -9,6 +8,18 @@ Thu Jun 15 17:43:21 EDT 1995 Paul Park (pjpark@mit.edu) with the Berkeley database code. Also, add shared library usage check. + +Thu Jun 15 16:18:39 1995 Sam Hartman + + * sys_term.c (getpty): On AIX, open /dev/ptc for master and use + ttyname() to get slave side; much simpler and doesn't get used + ptys. + + (cleanopen): Revoke on AIX as well. This may cause problems on early 3.2 versions, but not revoking causes disconnected sessions to be partially connected to new telnets. The complete fix will be to make sure telnetd cleans up when it dies. + + + + Fri Jun 9 18:29:56 1995 * configure.in: Remove standardized set of autoconf macros, which diff --git a/src/appl/telnet/telnetd/sys_term.c b/src/appl/telnet/telnetd/sys_term.c index 24a4ac10c..d5525625f 100644 --- a/src/appl/telnet/telnetd/sys_term.c +++ b/src/appl/telnet/telnetd/sys_term.c @@ -508,6 +508,14 @@ int *ptynum; } #else /* ! STREAMSPTY */ +#ifdef _AIX + if((p = open("/dev/ptc", 2)) != -1 ){ + strcpy(line, ttyname(p)); + chown( line, 0, 0); + chmod (line, 0600 ); + return (p); + } + #else /*_AIX*/ #ifndef CRAY register char *cp, *p1, *p2; register int i; @@ -599,6 +607,7 @@ int *ptynum; } } #endif /* CRAY */ +#endif /*_AIX*/ #endif /* STREAMSPTY */ return(-1); } @@ -1203,7 +1212,7 @@ cleanopen(line) (void) chmod(line, 0600); #endif -# if !defined(CRAY) && (BSD > 43) +# if (!defined(CRAY) && (BSD > 43))||defined(_AIX) (void) revoke(line); # endif #if defined(_SC_CRAY_SECURE_SYS)