aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorYoshinobu Inoue <shin@FreeBSD.org>2000-02-07 00:52:49 +0000
committerYoshinobu Inoue <shin@FreeBSD.org>2000-02-07 00:52:49 +0000
commitf306e0c85fcc9e76547cff084184d0b64abcb2bb (patch)
tree8f597342095d6bc53c2bd682cda5cc5b0542c99e /contrib
parentbc687a0b51dc840410fa77a9fb4d78e32df2c88a (diff)
Notes
Diffstat (limited to 'contrib')
-rw-r--r--contrib/telnet/telnet/commands.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/telnet/telnet/commands.c b/contrib/telnet/telnet/commands.c
index 8380c2969bda..bd671f8145db 100644
--- a/contrib/telnet/telnet/commands.c
+++ b/contrib/telnet/telnet/commands.c
@@ -2475,6 +2475,12 @@ tn(argc, argv)
(void) strncpy(_hostname, hostp, sizeof(_hostname) - 1);
_hostname[sizeof(_hostname)-1] = '\0';
hostname = _hostname;
+ } else if (error != 0) {
+ fprintf(stderr, "%s: %s\n", hostname, gai_strerror(error));
+ if (error == EAI_SYSTEM)
+ fprintf(stderr, "%s: %s\n", hostname, strerror(errno));
+ setuid(getuid());
+ return 0;
}
if (srcroute != 0) {
srp = 0;