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

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