Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Apr 1997 22:47:47 -0400 (EDT)
From:      Bill Paul <wpaul@skynet.ctr.columbia.edu>
To:        yves@CC.McGill.CA
Cc:        hackers@freebsd.org
Subject:   Re: NIS bug?
Message-ID:  <199704220247.WAA27667@skynet.ctr.columbia.edu>
In-Reply-To: <199704211831.OAA10693@maelstrom.cc.mcgill.ca> from "Yves Lepage" at Apr 21, 97 02:31:26 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Of all the gin joints in all the towns in all the world, Yves Lepage had 
to walk into mine and say: > 

> Hi all,
> 
> khamsin# ypcat passwd.byname | wc -l
>    33680
> khamsin# yp_mkdb -u mydomain/passwd.byname | wc -l
>    34472
> 
> Is it possible that there are remaining bug in ypcat (namely yp_getnext)?
> 
> Thanks,
> Yves

There is no such function as yp_getnext. I can't duplicate this behavior
on my home box so it's up to you to provide more details. (Note that my
sample passwd maps have about 31,000 entries, so I don't think it's a
problem with the databases overflowing (Berkeley DB is supposed to be able
to handle much more than 32K entries.) There's always a slight discrepancy
in the totals due to the extra YP_* keys that yp_mkdb adds to the maps 
(i.e. YP_MASTER_NAME, YP_DOMAIN_NAME, etc...); you can request these
entries specifically with yp_match(), but yp_first(), yp_next() and
yp_all() will skip over them (ypcat(1) uses yp_all()). But it's usually 
no more than a difference of 4 or 5 lines.

What I would suggest you do is:

# ypcat passwd.byname > file1
# yp_mkdb -u /var/yp/yourdomain/passwd.byname > file2
# diff -c file1 file2

Then see if you can spot some pattern in the diff that would explain
the discrepancy. Also check the passwd.byuid map for the same problem.

It would also help if you mentioned what version of FreeBSD this is
(server and client). My guess is that this is 2.1.x; I would be very
surprised (not to mention disappointed) if this was happening with
the ypserv from 2.2.x.

-Bill

-- 
=============================================================================
-Bill Paul            (212) 854-6020 | System Manager, Master of Unix-Fu
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
=============================================================================
 "It is not I who am crazy; it is I who am mad!" - Ren Hoek, "Space Madness"
=============================================================================



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704220247.WAA27667>