summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1999-04-08 21:39:34 +0000
committerBrian Somers <brian@FreeBSD.org>1999-04-08 21:39:34 +0000
commit4560ea546c0027ec136689a16781dac945725d52 (patch)
tree1a60dc96e019d2f833a51e0d0af92e9241e1dc8f /crypto
parentd5cf830ef16d030eef2802ccbc24390f58b13448 (diff)
Notes
Diffstat (limited to 'crypto')
-rw-r--r--crypto/telnet/telnetd/telnetd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/telnet/telnetd/telnetd.c b/crypto/telnet/telnetd/telnetd.c
index 8b4798c8c9c0..b522f19bae98 100644
--- a/crypto/telnet/telnetd/telnetd.c
+++ b/crypto/telnet/telnetd/telnetd.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static const char sccsid[] = "@(#)telnetd.c 8.4 (Berkeley) 5/30/95";
#endif
static const char rcsid[] =
- "$Id: telnetd.c,v 1.7 1999/04/06 23:35:21 brian Exp $";
+ "$Id: telnetd.c,v 1.8 1999/04/07 10:17:24 brian Exp $";
#endif /* not lint */
#include "telnetd.h"
@@ -93,7 +93,7 @@ int auth_level = 0;
int require_SecurID = 0;
#endif
-char remote_hostname[UT_HOSTSIZE + 1];
+char remote_hostname[MAXHOSTNAMELEN];
int utmp_len = sizeof(remote_hostname) - 1;
int registerd_host_only = 0;
@@ -871,6 +871,7 @@ doit(who)
Please contact your net administrator");
remote_hostname[sizeof(remote_hostname) - 1] = '\0';
+ trimdomain(remote_hostname, UT_HOSTSIZE);
if (!isdigit(remote_hostname[0]) && strlen(remote_hostname) > utmp_len)
strncpy(remote_hostname, inet_ntoa(who->sin_addr),
sizeof(remote_hostname) - 1);