From: Sam Hartman Date: Sun, 10 Nov 1996 23:48:51 +0000 (+0000) Subject: Call gethostbyaddr over what we connect to to get the Kerberos principal to X-Git-Tag: krb5-1.0-freeze1~66 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=87ff624d40218a193f89add6d5d5755586dff8ab;p=krb5.git Call gethostbyaddr over what we connect to to get the Kerberos principal to use; if that fails, fall back on what gethostbyname returns earlier. [170] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9363 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/telnet/telnet/ChangeLog b/src/appl/telnet/telnet/ChangeLog index af36a6cf7..96a6246dc 100644 --- a/src/appl/telnet/telnet/ChangeLog +++ b/src/appl/telnet/telnet/ChangeLog @@ -1,3 +1,8 @@ +Sun Nov 10 17:34:40 1996 Sam Hartman + + * commands.c (tn): Reverse resolve address to deal with dialup + pools [krb5-libs/170] + Fri Nov 1 00:49:21 1996 Sam Hartman * main.c: Implement Type Of Service patch from jhawk. [57] diff --git a/src/appl/telnet/telnet/commands.c b/src/appl/telnet/telnet/commands.c index 740be8aa7..b187f3d35 100644 --- a/src/appl/telnet/telnet/commands.c +++ b/src/appl/telnet/telnet/commands.c @@ -2554,6 +2554,13 @@ tn(argc, argv) return 0; } connected++; + host = gethostbyaddr((char *) &sin.sin_addr, sizeof(struct in_addr), sin.sin_family); + if (host) { + strncpy(_hostname, host->h_name, sizeof(_hostname)); + _hostname[sizeof(_hostname)-1] = '\0'; + hostname = _hostname; + } + #if defined(AUTHENTICATION) || defined(ENCRYPTION) auth_encrypt_connect(connected); #endif /* defined(AUTHENTICATION) || defined(ENCRYPTION) */