From owner-cvs-usrsbin Wed Oct 23 14:46:36 1996 Return-Path: owner-cvs-usrsbin Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA13741 for cvs-usrsbin-outgoing; Wed, 23 Oct 1996 14:46:36 -0700 (PDT) Received: (from wpaul@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA13715; Wed, 23 Oct 1996 14:46:22 -0700 (PDT) Date: Wed, 23 Oct 1996 14:46:22 -0700 (PDT) From: Bill Paul Message-Id: <199610232146.OAA13715@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-usrsbin Subject: cvs commit: src/usr.sbin/rpc.yppasswdd yppasswdd_server.c Sender: owner-cvs-usrsbin@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk wpaul 96/10/23 14:46:19 Modified: usr.sbin/rpc.yppasswdd yppasswdd_server.c Log: 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. Revision Changes Path 1.9 +33 -2 src/usr.sbin/rpc.yppasswdd/yppasswdd_server.c