aboutsummaryrefslogtreecommitdiff
path: root/nss
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2012-11-19 13:01:43 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2012-11-19 13:02:48 +0530
commitcfde9b463d63092ff0908d4c2748ace648e2ead8 (patch)
tree9ac0df733a6b3a01305f937e5e55ea63f3387328 /nss
parentf6da27e53695ad1cc0e2a9490358decbbfdff5e5 (diff)
downloadglibc-cfde9b463d63092ff0908d4c2748ace648e2ead8.zip
glibc-cfde9b463d63092ff0908d4c2748ace648e2ead8.tar.gz
glibc-cfde9b463d63092ff0908d4c2748ace648e2ead8.tar.bz2
Return EAI_SYSTEM if we're out of file descriptors
Resolves BZ #14719.
Diffstat (limited to 'nss')
-rw-r--r--nss/getXXbyYY_r.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index 8b3b61b..885b53b 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -284,7 +284,12 @@ done:
#endif
*result = status == NSS_STATUS_SUCCESS ? resbuf : NULL;
#ifdef NEED_H_ERRNO
- if (status != NSS_STATUS_SUCCESS && ! any_service)
+ if (status == NSS_STATUS_UNAVAIL)
+ /* Either we failed to lookup the functions or the functions themselves
+ had a system error. Set NETDB_INTERNAL here to let the caller know
+ that the errno may have the real reason for failure. */
+ *h_errnop = NETDB_INTERNAL;
+ else if (status != NSS_STATUS_SUCCESS && !any_service)
/* We were not able to use any service. */
*h_errnop = NO_RECOVERY;
#endif