From schwim@whatmore.Stanford.EDU Tue Mar 17 22:13:41 1998
Received: from MIT.EDU (PACIFIC-CARRIER-ANNEX.MIT.EDU [18.69.0.28]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id WAA19254 for <bugs@RT-11.MIT.EDU>; Tue, 17 Mar 1998 22:13:40 -0500
Received: from whatmore.Stanford.EDU by MIT.EDU with SMTP
id AB09767; Tue, 17 Mar 98 22:14:11 EST
Received: (from schwim@localhost)
by whatmore.Stanford.EDU (8.8.8/8.8.8) id TAA00979;
Tue, 17 Mar 1998 19:13:38 -0800 (PST)
Message-Id: <199803180313.TAA00979@whatmore.Stanford.EDU>
Date: Tue, 17 Mar 1998 19:13:38 -0800 (PST)
From: Larry Schwimmer <schwim@whatmore.Stanford.EDU>
To: krb5-bugs@MIT.EDU
Cc: schwim@leland.Stanford.EDU
Subject: PATCH: telnetd/klogind IRIX/AIX
telnetd and klogind do not work properly under IRIX and AIX
if packet mode is used.
Use the unmodified telnetd and klogind on IRIX or AIX. The
terminal misdisplays output for some programs. (For example, the pine
mail program is unusable on IRIX without this patch.)
Most of these two patches involve disabling the code for the
TIOCPKT ioctl for AIX and IRIX. The remainder could be cleaner, but
it points out what works.
yours,
Larry Schwimmer
schwim@leland.stanford.edu
Leland Systems Group
--- appl/bsd/krlogind.c.orig Fri Feb 6 19:41:17 1998
+++ appl/bsd/krlogind.c Mon Mar 16 17:25:40 1998
@@ -861,8 +938,8 @@
register tiocpkt_on = 0;
int on = 1;
#endif
-
-#if defined(TIOCPKT) && !defined(__svr4__) || defined(solaris20)
+
+#if (defined(TIOCPKT) && !defined(__svr4__) && !defined(sgi)) || defined(solaris20)
/* if system has TIOCPKT, try to turn it on. Some drivers
* may not support it. Save flag for later.
*/
--- appl/telnet/telnetd/telnetd.c.orig Fri Feb 6 19:41:48 1998
+++ appl/telnet/telnetd/telnetd.c Tue Mar 17 03:06:22 1998
@@ -1113,12 +1133,14 @@
if (my_state_is_wont(TELOPT_ECHO))
send_will(TELOPT_ECHO, 1);
+#if !defined(_AIX) && !defined(sgi)
#ifndef STREAMSPTY
/*
* Turn on packet mode
*/
(void) ioctl(p, TIOCPKT, (char *)&on);
#endif
+#endif
#if defined(LINEMODE) && defined(KLUDGELINEMODE)
/*
@@ -1370,6 +1392,20 @@
#else
pcc = readstream(p, ptyibuf, BUFSIZ);
#endif
+#if defined(_AIX) || defined(sgi)
+ if (pcc < 0 && (errno == EWOULDBLOCK ||
+#ifdef EAGAIN
+ errno == EAGAIN ||
+#endif
+ errno == EIO)) {
+ pcc = 0;
+ } else {
+ if (pcc <= 0)
+ break;
+ ptyip = ptyibuf;
+ }
+ }
+#else /* ! _AIX && !sgi */
/*
* On some systems, if we try to read something
* off the master side before the slave side is
@@ -1439,6 +1475,7 @@
#endif /* defined(CRAY2) && defined(UNICOS5) */
}
}
+#endif /* _AIX && sgi */
while (pcc > 0) {
if ((&netobuf[BUFSIZ] - nfrontp) < 2)
Responsible-Changed-From-To: gnats-admin->krb5-unassigned
Responsible-Changed-By: raeburn
Responsible-Changed-When: Fri Sep 14 11:33:59 2001
Responsible-Changed-Why:
reformat/refile
Received: from MIT.EDU (PACIFIC-CARRIER-ANNEX.MIT.EDU [18.69.0.28]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id WAA19254 for <bugs@RT-11.MIT.EDU>; Tue, 17 Mar 1998 22:13:40 -0500
Received: from whatmore.Stanford.EDU by MIT.EDU with SMTP
id AB09767; Tue, 17 Mar 98 22:14:11 EST
Received: (from schwim@localhost)
by whatmore.Stanford.EDU (8.8.8/8.8.8) id TAA00979;
Tue, 17 Mar 1998 19:13:38 -0800 (PST)
Message-Id: <199803180313.TAA00979@whatmore.Stanford.EDU>
Date: Tue, 17 Mar 1998 19:13:38 -0800 (PST)
From: Larry Schwimmer <schwim@whatmore.Stanford.EDU>
To: krb5-bugs@MIT.EDU
Cc: schwim@leland.Stanford.EDU
Subject: PATCH: telnetd/klogind IRIX/AIX
Show quoted text
>Number: 562
>Category: krb5-clients
>Synopsis: AIX and IRIX should not use packet mode
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: krb5-unassigned
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Tue Mar 17 22:14:01 EST 1998
>Last-Modified: Fri Sep 14 11:34:35 EDT 2001
>Originator: Larry Schwimmer
>Organization:
>Release: 1.0.5
>Environment:
IRIX, AIX>Category: krb5-clients
>Synopsis: AIX and IRIX should not use packet mode
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: krb5-unassigned
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Tue Mar 17 22:14:01 EST 1998
>Last-Modified: Fri Sep 14 11:34:35 EDT 2001
>Originator: Larry Schwimmer
>Organization:
>Release: 1.0.5
>Environment:
Show quoted text
>Description:
telnetd and klogind do not work properly under IRIX and AIX
if packet mode is used.
Show quoted text
>How-To-Repeat:
Use the unmodified telnetd and klogind on IRIX or AIX. The
terminal misdisplays output for some programs. (For example, the pine
mail program is unusable on IRIX without this patch.)
Show quoted text
>Fix:
Most of these two patches involve disabling the code for the
TIOCPKT ioctl for AIX and IRIX. The remainder could be cleaner, but
it points out what works.
yours,
Larry Schwimmer
schwim@leland.stanford.edu
Leland Systems Group
--- appl/bsd/krlogind.c.orig Fri Feb 6 19:41:17 1998
+++ appl/bsd/krlogind.c Mon Mar 16 17:25:40 1998
@@ -861,8 +938,8 @@
register tiocpkt_on = 0;
int on = 1;
#endif
-
-#if defined(TIOCPKT) && !defined(__svr4__) || defined(solaris20)
+
+#if (defined(TIOCPKT) && !defined(__svr4__) && !defined(sgi)) || defined(solaris20)
/* if system has TIOCPKT, try to turn it on. Some drivers
* may not support it. Save flag for later.
*/
--- appl/telnet/telnetd/telnetd.c.orig Fri Feb 6 19:41:48 1998
+++ appl/telnet/telnetd/telnetd.c Tue Mar 17 03:06:22 1998
@@ -1113,12 +1133,14 @@
if (my_state_is_wont(TELOPT_ECHO))
send_will(TELOPT_ECHO, 1);
+#if !defined(_AIX) && !defined(sgi)
#ifndef STREAMSPTY
/*
* Turn on packet mode
*/
(void) ioctl(p, TIOCPKT, (char *)&on);
#endif
+#endif
#if defined(LINEMODE) && defined(KLUDGELINEMODE)
/*
@@ -1370,6 +1392,20 @@
#else
pcc = readstream(p, ptyibuf, BUFSIZ);
#endif
+#if defined(_AIX) || defined(sgi)
+ if (pcc < 0 && (errno == EWOULDBLOCK ||
+#ifdef EAGAIN
+ errno == EAGAIN ||
+#endif
+ errno == EIO)) {
+ pcc = 0;
+ } else {
+ if (pcc <= 0)
+ break;
+ ptyip = ptyibuf;
+ }
+ }
+#else /* ! _AIX && !sgi */
/*
* On some systems, if we try to read something
* off the master side before the slave side is
@@ -1439,6 +1475,7 @@
#endif /* defined(CRAY2) && defined(UNICOS5) */
}
}
+#endif /* _AIX && sgi */
while (pcc > 0) {
if ((&netobuf[BUFSIZ] - nfrontp) < 2)
Show quoted text
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->krb5-unassigned
Responsible-Changed-By: raeburn
Responsible-Changed-When: Fri Sep 14 11:33:59 2001
Responsible-Changed-Why:
reformat/refile
Show quoted text
>Unformatted: