Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main-src > by-pkgid > f2c9a24e570f82c24fd7074143d03478 > files > 23

nss_ldap-253-42.el5.src.rpm

When we run out of buffer space and set result to NSS_STATUS_TRYAGAIN and errno
to ERANGE, and we're also setting h_errno, set it to NETDB_INTERNAL, which libc
also checks when it's available.  The _nss_ldap_getbyname function will already
have set errno for us, so we go with the patch as used rather than the original
one, which also set errno here.

diff -uNr nss_ldap-263/util.h nss_ldap-264/util.h
--- nss_ldap-263/util.h	2008-10-15 09:30:45.000000000 -0400
+++ nss_ldap-264/util.h	2008-10-30 16:50:15.000000000 -0400
@@ -152,7 +152,7 @@
 			(herr) = 0;		\
 			break;			\
 		case NSS_TRYAGAIN:		\
-			(herr) = TRY_AGAIN;	\
+			(herr) = NETDB_INTERNAL;\
 			break;			\
 		case NSS_NOTFOUND:		\
 			(herr) = HOST_NOT_FOUND;\