[prev in list] [next in list] [prev in thread] [next in thread]
List: openssh-bugs
Subject: [Bug 2122] New: ssh: Could not resolve hostname nohost: Success
From: bugzilla-daemon () mindrot ! org
Date: 2013-06-24 13:45:16
Message-ID: bug-2122-705 () https ! bugzilla ! mindrot ! org/
[Download RAW message or body]
https://bugzilla.mindrot.org/show_bug.cgi?id=2122
Bug ID: 2122
Summary: ssh: Could not resolve hostname nohost: Success
Product: Portable OpenSSH
Version: 6.2p1
Hardware: Other
OS: Linux
Status: NEW
Severity: enhancement
Priority: P5
Component: ssh
Assignee: unassigned-bugs@mindrot.org
Reporter: plautrba@redhat.com
When the resolver is not configured properly, ssh shows a "Success"
error message:
/etc/nsswitch.conf:
hosts: files dns xyz
$ ssh nohost
ssh: Could not resolve hostname nohost: Success
The message "Success" doesn't make sense given that it's in fact a
system error. It's an issue of ssh_gai_strerror() which can't handle a
situation when getaddrinfo() returns EAI_SYSTEM but errno is not set/is
set to 0.
A potential fix:
--- a/misc.c
+++ b/misc.c
@@ -127,7 +127,7 @@ unset_nonblock(int fd)
const char *
ssh_gai_strerror(int gaierr)
{
- if (gaierr == EAI_SYSTEM)
+ if (gaierr == EAI_SYSTEM && errno != 0)
return strerror(errno);
return gai_strerror(gaierr);
}
--
You are receiving this mail because:
You are watching the assignee of the bug.
_______________________________________________
openssh-bugs mailing list
openssh-bugs@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-bugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic