[2501] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

pending/233: telnet patch

daemon@ATHENA.MIT.EDU (Charles M. Hannum)
Sat Nov 23 00:25:08 1996

Resent-From: gnats@rt-11.MIT.EDU (GNATS Management)
Resent-To: gnats-admin@rt-11.MIT.EDU
Resent-Reply-To: krb5-bugs@MIT.EDU,
        "Charles M. Hannum" <mycroft@gnu.ai.mit.edu>
Date: Sat, 23 Nov 1996 00:18:40 -0500 (EST)
From: "Charles M. Hannum" <mycroft@gnu.ai.mit.edu>
To: hartmans@MIT.EDU


>Number:         233
>Category:       pending
>Synopsis:       telnet patch
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Sat Nov 23 00:25:03 EST 1996
>Last-Modified:
>Originator:
>Organization:
>Release:
>Environment:
>Description:
>How-To-Repeat:
>Fix:
>Audit-Trail:
>Unformatted:
The `-1' doesn't work on a 64-bit system (NetBSD/alpha).  Also, it's
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 {


home help back first fref pref prev next nref lref last post