[2430] in Kerberos-V5-bugs
krb5-libs/170: Interum fix for telnet
daemon@ATHENA.MIT.EDU (Sam Hartman)
Sun Nov 10 19:04:26 1996
Date: Sun, 10 Nov 1996 19:04:18 -0500
From: Sam Hartman <hartmans@MIT.EDU>
To: krb5-prs@rt-11.mit.edu
Cc: krb5-bugs@MIT.EDU
The patch ends up being incredibly trivial. This should help people
avoid dependence on having multiple hosts that share the same key.
Index: commands.c
===================================================================
RCS file: /mit/krbdev/.cvsroot/src/appl/telnet/telnet/commands.c,v
retrieving revision 5.23
retrieving revision 5.24
diff -c -r5.23 -r5.24
*** commands.c 1996/11/02 01:46:31 5.23
--- commands.c 1996/11/10 23:48:51 5.24
***************
*** 2554,2559 ****
--- 2554,2566 ----
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) */