> > > > On a client bound to this server, please do: > > > > % ypwhich -m > > > > > > Thanks for getting back to me on this. First off, apologies if I'd > > > failed to mention the server before...Now, on a -CURRENT NIS client > > > (with rev 1.81 > > > getpwent.c): > > > $ ypwhich -m > > > shadow dc3 > > > passwd.byuid dc3 > > [...] > > > > Ok, so it does support the YPPROC_MASTER procedure. Let's try > > something a little different. This time, do: > > > > % ypwhich -m master.passwd.byname > > > > And show the results. Might as well try ypwhich -m > > master.passwd.byuid too, though the result will probably be the same. > > > Ok....Using getpwent.c v1.82 with your diff: > > # id robin > id: robin: no such user > # ypwhich -m master.passwd.byname > dc3 > # ypwhich -m master.passwd.byuid > dc3 [...] ARRRRGH!!!! Ok, first, whoever is responsible for this NIS server implementation is an idiot. It appears the YPPROC_MASTER procedure does no argument validation and always returns success even for maps that don't exist. This is why revision 1.182 fails in your case: using yp_master() to check for the master.passwd maps succeeds, which makes the code think it should be doing master.passwd lookups (which ultimately fail when the actual lookup is performed). Fortunately, it looks like YPPROC_ORDER works correctly: fbsd5_at_test [~]$ ypwhich GCDC2.gc.nat fbsd5_at_test [~]$ ypwhich -m master.passwd.byname dc3 fbsd5_at_test [~]$ yppoll master.passwd.byname yppoll: no such map master.passwd.byname. Reason: No such map in server's domain fbsd5_at_test [~]$ yppoll passwd.byname Map passwd.byname has order number 10683. Wed Dec 31 21:58:03 1969 The master server is dc3. Second, I'm an idiot because I made a mistake in the patch I provided: the nis_map() function should return NS_UNAVAIL if yp_order() fails, rather than falling through and returning NS_SUCCESS all the time. I uploaded a new diff, please test this instead: http://www.freebsd.org/~wpaul/getpwent.diff Thanks for providing me access to this machine, it helped me realize where I'd gone wrong in my patch. If this works for you, and if nobody objects, I will check it in. -Bill -- ============================================================================= -Bill Paul (510) 749-2329 | Senior Engineer, Master of Unix-Fu wpaul_at_windriver.com | Wind River Systems ============================================================================= "If stupidity were a handicap, you'd have the best parking spot." =============================================================================Received on Tue Jul 15 2003 - 08:44:15 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:15 UTC