diff options
Diffstat (limited to 'nss/getXXbyYY_r.c')
-rw-r--r-- | nss/getXXbyYY_r.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c index 8b3b61b663..885b53b60b 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 |