Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Feb 1999 07:52:15 -0800 (PST)
From:      mystify@friley-184-92.res.iastate.edu
To:        freebsd-gnats-submit@FreeBSD.ORG
Subject:   bin/10030: Kerberized telnet fails to encrypt when a hostname alias is used (patch included)
Message-ID:  <199902111552.HAA05155@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         10030
>Category:       bin
>Synopsis:       Kerberized telnet fails to encrypt when a hostname alias is used (patch included)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 11 08:00:01 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     Patrick Hartling
>Release:        4.0-current
>Organization:
ICEMT
>Environment:
FreeBSD friley-184-92.res.iastate.edu 4.0-CURRENT FreeBSD 4.0-CURRENT #0: Wed Feb 10 10:53:07 CST 1999     mystify@friley-184-92.res.iastate.edu:/usr/src/sys/compile/xDOGBERT  i386
>Description:
If 'telnet -ax' is used with a hostname that is an alias for a machine's
actual hostname, Kerberos encryption fails.  This can happen when an
alias cycles through several IP addresses.  For example,
isua.iastate.edu is an alias for isua[1-5].iastate.edu
>How-To-Repeat:
Do 'telnet -ax <hostname>' where <hostname> is an alias.
>Fix:
The following patch fixes the problem:

*** crypto/telnet/telnet/commands.c.orig        Tue Feb  9 21:09:38 1999
--- crypto/telnet/telnet/commands.c     Tue Feb  9 21:53:43 1999
***************
*** 2382,2387 ****
--- 2382,2395 ----
                memmove((caddr_t)&sin.sin_addr, host->h_addr, host->h_length);
  #endif        /* defined(h_addr) */
                strncpy(_hostname, host->h_name, sizeof(_hostname));
+ 
+               /* Ensure that we have the real hostname. */
+               host = gethostbyaddr((char*) &sin.sin_addr,
+                                    sizeof(sin.sin_addr), AF_INET);
+               if ( host ) {
+                   strncpy(_hostname, host->h_name, sizeof(_hostname));
+               }
+ 
                _hostname[sizeof(_hostname)-1] = '\0';
                hostname = _hostname;
            } else {

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902111552.HAA05155>