Subject: Re: 3.0 YP lookup latency
To: None <jonathan@dsg.stanford.edu>
From: Brian Ginsbach <ginsbach@NetBSD.org>
List: tech-net
Date: 06/21/2006 19:08:37
On Wed, Jun 21, 2006 at 09:42:15AM -0700, jonathan@dsg.stanford.edu wrote:
> I'm pretty sure the bug is the client NIS library. If you look at
> lib/libc/gen/getpwent.c
>
> you will notice that file changed radically between (CVS branches)
> netbsd-2 and netbsd-3. getpwent.c only calls yp_match() or
> yp_first()/yp_next() in a couple of places. Late last night I emailed
> you and Stephen and Soda-san a walk through the relevant code-paths. I
> think I've identified the problem, and suggested a workaround: don't
> use the supplied default nsswitch.conf
>
> passwd: compat
>
> line, but instead use
>
> passswd: nis [notfound=return] files
>
> which avoids the compat_ parsing routine where I'm pretty this bug
> resides. I also suggested a fix (assuming the workaround does fix
> Stephen's problem).
>
Where exactly do you see the problem? I think that _compat_pwscan()
is broken. Specifically the call to _passwdcompat_pwscan() for
COMPAT_FULL should probably pass search rather than _PW_KEYBYNUM.
Was this your suggested fix?