diff options
| author | Yoshinobu Inoue <shin@FreeBSD.org> | 2000-02-07 00:52:49 +0000 |
|---|---|---|
| committer | Yoshinobu Inoue <shin@FreeBSD.org> | 2000-02-07 00:52:49 +0000 |
| commit | f306e0c85fcc9e76547cff084184d0b64abcb2bb (patch) | |
| tree | 8f597342095d6bc53c2bd682cda5cc5b0542c99e /usr.bin/telnet | |
| parent | bc687a0b51dc840410fa77a9fb4d78e32df2c88a (diff) | |
Notes
Diffstat (limited to 'usr.bin/telnet')
| -rw-r--r-- | usr.bin/telnet/commands.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.bin/telnet/commands.c b/usr.bin/telnet/commands.c index 33a45481667da..b7e81c4935e7e 100644 --- a/usr.bin/telnet/commands.c +++ b/usr.bin/telnet/commands.c @@ -2298,6 +2298,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; |
