Blame SOURCES/nss-pam-ldapd-0.8.13-Use-right-h_errnop-for-retrying-with-larger-buffer.patch

c82b94
From ec86b3d715ae9583288b12686a0552586caa6270 Mon Sep 17 00:00:00 2001
c82b94
From: Lukas Slebodnik <lslebodn@redhat.com>
c82b94
Date: Mon, 27 Jan 2014 17:17:33 +0100
c82b94
Subject: [PATCH 2/2] Use right h_errnop for retrying with larger buffer.
c82b94
c82b94
The libc nsswitch code expects h_errno to be set to NETDB_INTERNAL when
c82b94
it needs to try again with a larger buffer.
c82b94
---
c82b94
 nss/hosts.c    | 2 +-
c82b94
 nss/networks.c | 2 +-
c82b94
 2 files changed, 2 insertions(+), 2 deletions(-)
c82b94
c82b94
diff --git a/nss/hosts.c b/nss/hosts.c
c82b94
index 0e7027e..2bf4c86 100644
c82b94
--- a/nss/hosts.c
c82b94
+++ b/nss/hosts.c
c82b94
@@ -52,7 +52,7 @@
c82b94
 #undef ERROR_OUT_BUFERROR
c82b94
 #define ERROR_OUT_BUFERROR(fp) \
c82b94
   *errnop=ERANGE; \
c82b94
-  *h_errnop=TRY_AGAIN; \
c82b94
+  *h_errnop=NETDB_INTERNAL; \
c82b94
   return NSS_STATUS_TRYAGAIN;
c82b94
 
c82b94
 #undef ERROR_OUT_WRITEERROR
c82b94
diff --git a/nss/networks.c b/nss/networks.c
c82b94
index 1403b45..f3cb269 100644
c82b94
--- a/nss/networks.c
c82b94
+++ b/nss/networks.c
c82b94
@@ -52,7 +52,7 @@
c82b94
 #undef ERROR_OUT_BUFERROR
c82b94
 #define ERROR_OUT_BUFERROR(fp) \
c82b94
   *errnop=ERANGE; \
c82b94
-  *h_errnop=TRY_AGAIN; \
c82b94
+  *h_errnop=NETDB_INTERNAL; \
c82b94
   return NSS_STATUS_TRYAGAIN;
c82b94
 
c82b94
 #undef ERROR_OUT_WRITEERROR
c82b94
-- 
c82b94
1.8.5.3
c82b94