summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2013-07-12 00:43:51 +0000
committerDamien Miller <djm@cvs.openbsd.org>2013-07-12 00:43:51 +0000
commit2cc19fa6c50e8055a97755026522812c6dd6a052 (patch)
tree57db7c11be65d3686c45b407c5501d53f1031cdd /usr.bin
parentd9e1c46d70d52bf44147fad7c7676f88cd662d15 (diff)
in ssh_gai_strerror() don't fallback to strerror for EAI_SYSTEM when
errno == 0. Avoids confusing error message in some broken resolver cases. bz#2122 patch from plautrba AT redhat.com; ok dtucker
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/misc.c b/usr.bin/ssh/misc.c
index 82047f96b14..b3f2590fc27 100644
--- a/usr.bin/ssh/misc.c
+++ b/usr.bin/ssh/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.90 2013/06/01 13:15:52 dtucker Exp $ */
+/* $OpenBSD: misc.c,v 1.91 2013/07/12 00:43:50 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -119,7 +119,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);
}