]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add extra sanity checking to the in-place update routine. Sometimes you
authorBill Paul <wpaul@FreeBSD.org>
Wed, 23 Oct 1996 21:46:17 +0000 (21:46 +0000)
committerBill Paul <wpaul@FreeBSD.org>
Wed, 23 Oct 1996 21:46:17 +0000 (21:46 +0000)
commit323a8537ab0063b3baad597db55892371047eb79
tree8432bfed75946bfe2c3c92cab9f6005d7fbfac27
parent36be1f6be985422758260aac919ef741380f1bb0
Add extra sanity checking to the in-place update routine. Sometimes you
find two users with the same UID (i.e. root and toor), but yp_mkdb(8)
forbits duplicate keys, so only one of them will end up in the *.byuid
maps (probably toor, since it comes after root in the template file).
If I asked rpc.yppasswdd(8) to change toor's password, it would update
the *.byname maps correctly, but incorrectly modify root's entry in
the *.byuid maps since the only matching record with UID=0 in those
maps belongs to root.

To fix this, we check that both the name and UID are correct before trying
to write new entries to the maps.
usr.sbin/rpc.yppasswdd/yppasswdd_server.c