Date: Thu, 18 Dec 2003 08:54:53 -0600 From: "Jacques A. Vidrine" <nectar@FreeBSD.org> To: Lachlan O'Dea <odela01@ca.com> Cc: freebsd-bugs@FreeBSD.org Subject: Re: bin/60287: [patch] NSS does not handle NSS_STATUS_TRYAGAIN properly Message-ID: <20031218145453.GB35590@madman.celabo.org> In-Reply-To: <200312181414.hBIEENcW093868@freefall.freebsd.org> References: <200312181414.hBIEENcW093868@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Lachlan, Thank you for your report! I believe your analysis is correct. There is one subtlety that must also be resolved. Within FreeBSD's nsswitch, one indicates that the given buffer is too small by setting errno to ERANGE and return RETURN. The convention for GNU libc modules seems to be to set errno to ERANGE and return TRYAGAIN. Unfortunately, nss_ldap seems to do neither :-) It does return TRYAGAIN, but it does not set errno, so one cannot distinguish between providing a too-small-buffer and, say, not enough heap memory. So, I believe I need to apply something approximating your patch, but also nss_ldap needs to be corrected to set ERANGE where appropriate. Cheers, -- Jacques Vidrine NTT/Verio SME FreeBSD UNIX Heimdal nectar@celabo.org jvidrine@verio.net nectar@freebsd.org nectar@kth.se P.S. If I cannot address this today, I'm afraid it will be early January before I get to it--- I'm leaving home early tomorrow and won't be back until then.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031218145453.GB35590>