don't show Success for EAI_SYSTEM (#985964)

This commit is contained in:
Petr Lautrbach 2013-07-23 12:07:49 +02:00
parent 2ee6810919
commit 17df27c668
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,23 @@
diff -U0 openssh-6.2p2/ChangeLog.ssh_gai_strerror openssh-6.2p2/ChangeLog
--- openssh-6.2p2/ChangeLog.ssh_gai_strerror 2013-07-23 12:03:41.467902339 +0200
+++ openssh-6.2p2/ChangeLog 2013-07-23 12:06:03.414281151 +0200
@@ -0,0 +1,7 @@
+20130718
+ - djm@cvs.openbsd.org 2013/07/12 00:43:50
+ [misc.c]
+ 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
+
diff -up openssh-6.2p2/misc.c.ssh_gai_strerror openssh-6.2p2/misc.c
--- openssh-6.2p2/misc.c.ssh_gai_strerror 2013-07-23 12:03:41.321902978 +0200
+++ openssh-6.2p2/misc.c 2013-07-23 12:03:41.467902339 +0200
@@ -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);
}

View File

@ -184,6 +184,8 @@ Patch905: openssh-6.2p1-modpipe-cflags.patch
Patch907: openssh-6.2p1-aarch64.patch Patch907: openssh-6.2p1-aarch64.patch
# make sftp's libedit interface marginally multibyte aware (#841771) # make sftp's libedit interface marginally multibyte aware (#841771)
Patch908: openssh-6.2p2-sftp-multibyte.patch Patch908: openssh-6.2p2-sftp-multibyte.patch
# don't show Success for EAI_SYSTEM (#985964)
Patch909: openssh-6.2p2-ssh_gai_strerror.patch
License: BSD License: BSD
@ -405,6 +407,7 @@ popd
%patch905 -p1 -b .modpipe-cflags %patch905 -p1 -b .modpipe-cflags
%patch907 -p1 -b .aarch64 %patch907 -p1 -b .aarch64
%patch908 -p1 -b .sftp-multibyte %patch908 -p1 -b .sftp-multibyte
%patch909 -p1 -b .ssh_gai_strerror
%if 0 %if 0
# Nothing here yet # Nothing here yet