From owner-freebsd-commit Thu Jun 15 20:33:27 1995 Return-Path: commit-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id UAA08723 for commit-outgoing; Thu, 15 Jun 1995 20:33:27 -0700 Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id UAA08707 for cvs-usrbin-outgoing; Thu, 15 Jun 1995 20:33:21 -0700 Received: (from wpaul@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id UAA08691 ; Thu, 15 Jun 1995 20:33:13 -0700 Date: Thu, 15 Jun 1995 20:33:13 -0700 From: Bill Paul Message-Id: <199506160333.UAA08691@freefall.cdrom.com> To: CVS-commiters, cvs-usrbin Subject: cvs commit: src/usr.bin/passwd passwd.c Sender: commit-owner@FreeBSD.org Precedence: bulk wpaul 95/06/15 20:33:12 Modified: usr.bin/passwd passwd.c Log: Patch to fix PR #518. In a system with no NIS, passwd will complain that it can't contact an NIS server when asked to change the password of an invalid user. It should say 'unknown user' instead. The fix is to check for the _PW_KEYYPENABLED flag in the password database and only roll over into the yppasswd stuff if the flag is enabled (this means passwd will not behave as yppasswd if there are no +::::::::: entries in /etc/master.passwd). If NIS is enabled but the user says 'passwd -l foouser' where foouser exists in the NIS maps, but not in /etc/master.passwd, we also say 'unknown user.' This is so we don't outsmart ourselves: specifying the -l flag restricts passwd to the local password database even if NIS is enabled. This change should probably be merged into 2.1.