From hartmans@mit.edu Sat Nov 23 00:24:37 1996
Received: from tertius.mit.edu (TERTIUS.MIT.EDU [18.245.0.72]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id AAA15712 for <bugs@rt-11.mit.edu>; Sat, 23 Nov 1996 00:24:33 -0500
Received: (from hartmans@localhost) by tertius.mit.edu (8.6.12/8.6.9) id AAA07259 for bugs@rt-11; Sat, 23 Nov 1996 00:24:32 -0500
Received: from SOUTH-STATION-ANNEX.MIT.EDU by po10.MIT.EDU (5.61/4.7) id AA18282; Sat, 23 Nov 96 00:18:45 EST
Received: from melange.gnu.ai.mit.edu by MIT.EDU with SMTP
id AA17602; Sat, 23 Nov 96 00:18:43 EST
Received: by melange.gnu.ai.mit.edu (8.7.5/8.6.12GNU) id AAA06633 for hartmans@mit.edu; Sat, 23 Nov 1996 00:18:40 -0500 (EST)
Message-Id: <199611230518.AAA06633@melange.gnu.ai.mit.edu>
Date: Sat, 23 Nov 1996 00:18:40 -0500 (EST)
From: "Charles M. Hannum" <mycroft@gnu.ai.mit.edu>
Sender: hartmans@mit.edu
To: hartmans@mit.edu
Subject: telnet patch
Responsible-Changed-From-To: gnats-admin->hartmans
Responsible-Changed-By: hartmans
Responsible-Changed-When: Sat Nov 23 00:26:01 1996
Responsible-Changed-Why:
Assign to sam,
State-Changed-From-To: open-closed
State-Changed-By: hartmans
State-Changed-When: Sat Nov 23 00:44:10 1996
State-Changed-Why:
Fixed by applying patch. I removed the reverse resolve
as we already do that somewhere else. [233]
From: John Hawkinson <jhawk@MIT.EDU>
To: krb5-bugs@MIT.EDU
Cc: krb5-prs@RT-11.MIT.EDU
Subject: Re: pending/233: telnet patch
Date: Sat, 23 Nov 1996 00:53:16 -0500
This is fine (modulo the lack of INADDR_NONE under 4.3BSD).
This is not. This patch isn't going to be committed because telnet
already reverse-resolves the IP address later on, at least in some cases.
Nevertheless, reverse-resolution of IP addresses specified to telnet
is in general a bad idea, for a number of reasons:
1) It is not a program's business to reverse-resolve its
arguments.
2) The only reason to display an IP address
in the case of a hostname being entered is because
a hostname can map to multiple IP addresses and it is
important to know which one is connected to.
3) In the event of a infrastructure failure (for instance,
a case where DNS has to time out in a painful fashion),
a user may enter an IP address. They should not be burdened
with a slow response time due to reverse-resolution.
Some of these are seemingly obviated by the necessity of reverse-resolution
in the case of Kerberos authentication; I will be submitting code to
allow user-specification of the principal to authenticate as (-P) to
alleviate this problem.
--jhawk
nice to display the host name even if the person typed in an IP
address.
(Both of these are straight out of the NetBSD source tree.)
Index: commands.c
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/krbdev/.cvsroot/src/appl/telnet/telnet/commands.c,v
retrieving revision 5.25
diff -c -2 -r5.25 commands.c
*** commands.c 1996/11/11 02:13:36 5.25
--- commands.c 1996/11/22 18:26:51
***************
*** 2444,2451 ****
#endif
temp = inet_addr(hostp);
! if (temp != (unsigned long) -1) {
sin.sin_addr.s_addr = temp;
sin.sin_family = AF_INET;
! (void) strcpy(_hostname, hostp);
hostname = _hostname;
} else {
--- 2444,2455 ----
#endif
temp = inet_addr(hostp);
! if (temp != INADDR_NONE) {
sin.sin_addr.s_addr = temp;
sin.sin_family = AF_INET;
! host = gethostbyaddr((char *)&temp, sizeof(temp), AF_INET);
! if (host)
! (void) strcpy(_hostname, host->h_name);
! else
! (void) strcpy(_hostname, hostp);
hostname = _hostname;
} else {
Received: from tertius.mit.edu (TERTIUS.MIT.EDU [18.245.0.72]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id AAA15712 for <bugs@rt-11.mit.edu>; Sat, 23 Nov 1996 00:24:33 -0500
Received: (from hartmans@localhost) by tertius.mit.edu (8.6.12/8.6.9) id AAA07259 for bugs@rt-11; Sat, 23 Nov 1996 00:24:32 -0500
Received: from SOUTH-STATION-ANNEX.MIT.EDU by po10.MIT.EDU (5.61/4.7) id AA18282; Sat, 23 Nov 96 00:18:45 EST
Received: from melange.gnu.ai.mit.edu by MIT.EDU with SMTP
id AA17602; Sat, 23 Nov 96 00:18:43 EST
Received: by melange.gnu.ai.mit.edu (8.7.5/8.6.12GNU) id AAA06633 for hartmans@mit.edu; Sat, 23 Nov 1996 00:18:40 -0500 (EST)
Message-Id: <199611230518.AAA06633@melange.gnu.ai.mit.edu>
Date: Sat, 23 Nov 1996 00:18:40 -0500 (EST)
From: "Charles M. Hannum" <mycroft@gnu.ai.mit.edu>
Sender: hartmans@mit.edu
To: hartmans@mit.edu
Subject: telnet patch
Show quoted text
>Number: 233
>Category: telnet
>Synopsis: telnet patch
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: hartmans
>State: closed
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Sat Nov 23 00:25:03 EST 1996
>Last-Modified: Sat Nov 23 00:54:01 EST 1996
>Originator:
>Organization:
>Release:
>Environment:
>Description:
>How-To-Repeat:
>Fix:
>Audit-Trail:
>Category: telnet
>Synopsis: telnet patch
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: hartmans
>State: closed
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Sat Nov 23 00:25:03 EST 1996
>Last-Modified: Sat Nov 23 00:54:01 EST 1996
>Originator:
>Organization:
>Release:
>Environment:
>Description:
>How-To-Repeat:
>Fix:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->hartmans
Responsible-Changed-By: hartmans
Responsible-Changed-When: Sat Nov 23 00:26:01 1996
Responsible-Changed-Why:
Assign to sam,
State-Changed-From-To: open-closed
State-Changed-By: hartmans
State-Changed-When: Sat Nov 23 00:44:10 1996
State-Changed-Why:
Fixed by applying patch. I removed the reverse resolve
as we already do that somewhere else. [233]
From: John Hawkinson <jhawk@MIT.EDU>
To: krb5-bugs@MIT.EDU
Cc: krb5-prs@RT-11.MIT.EDU
Subject: Re: pending/233: telnet patch
Date: Sat, 23 Nov 1996 00:53:16 -0500
Show quoted text
> The `-1' doesn't work on a 64-bit system (NetBSD/alpha).
This is fine (modulo the lack of INADDR_NONE under 4.3BSD).
Show quoted text
> Also, it's nice to display the host name even if the person typed in
> an IP address.
> an IP address.
This is not. This patch isn't going to be committed because telnet
already reverse-resolves the IP address later on, at least in some cases.
Nevertheless, reverse-resolution of IP addresses specified to telnet
is in general a bad idea, for a number of reasons:
1) It is not a program's business to reverse-resolve its
arguments.
2) The only reason to display an IP address
in the case of a hostname being entered is because
a hostname can map to multiple IP addresses and it is
important to know which one is connected to.
3) In the event of a infrastructure failure (for instance,
a case where DNS has to time out in a painful fashion),
a user may enter an IP address. They should not be burdened
with a slow response time due to reverse-resolution.
Some of these are seemingly obviated by the necessity of reverse-resolution
in the case of Kerberos authentication; I will be submitting code to
allow user-specification of the principal to authenticate as (-P) to
alleviate this problem.
--jhawk
Show quoted text
>Unformatted:
The `-1' doesn't work on a 64-bit system (NetBSD/alpha). Also, it'snice to display the host name even if the person typed in an IP
address.
(Both of these are straight out of the NetBSD source tree.)
Index: commands.c
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/krbdev/.cvsroot/src/appl/telnet/telnet/commands.c,v
retrieving revision 5.25
diff -c -2 -r5.25 commands.c
*** commands.c 1996/11/11 02:13:36 5.25
--- commands.c 1996/11/22 18:26:51
***************
*** 2444,2451 ****
#endif
temp = inet_addr(hostp);
! if (temp != (unsigned long) -1) {
sin.sin_addr.s_addr = temp;
sin.sin_family = AF_INET;
! (void) strcpy(_hostname, hostp);
hostname = _hostname;
} else {
--- 2444,2455 ----
#endif
temp = inet_addr(hostp);
! if (temp != INADDR_NONE) {
sin.sin_addr.s_addr = temp;
sin.sin_family = AF_INET;
! host = gethostbyaddr((char *)&temp, sizeof(temp), AF_INET);
! if (host)
! (void) strcpy(_hostname, host->h_name);
! else
! (void) strcpy(_hostname, hostp);
hostname = _hostname;
} else {