From owner-cvs-all Thu Jul 11 22:33:38 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE97237B400; Thu, 11 Jul 2002 22:33:34 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7830D43E09; Thu, 11 Jul 2002 22:33:34 -0700 (PDT) (envelope-from cjc@FreeBSD.org) Received: from freefall.freebsd.org (cjc@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6C5XYJU017955; Thu, 11 Jul 2002 22:33:34 -0700 (PDT) (envelope-from cjc@freefall.freebsd.org) Received: (from cjc@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6C5XYrA017954; Thu, 11 Jul 2002 22:33:34 -0700 (PDT) Message-Id: <200207120533.g6C5XYrA017954@freefall.freebsd.org> From: "Crist J. Clark" Date: Thu, 11 Jul 2002 22:33:34 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/chpass chpass.c X-FreeBSD-CVS-Branch: RELENG_4 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG cjc 2002/07/11 22:33:34 PDT Modified files: (Branch: RELENG_4) usr.bin/chpass chpass.c Log: In preventing races in making changes to the password file when the locking mechanism was relaxed, it was assumed the '-a' option was only being used to add new entries. The result was '-a' option could not be used to overwrite an existing entry, but this is a legitimate use. Now when doing an overwrite, check if the user exists and load the old entry for later verification. If the user does not exist, there is no reason to check later. Note that I this is only fixed in 4-STABLE. When des overhauled the passwd related commands and functions in 5-CURRENT (thanx!), the logic of the file was changed and it doesn't have _this_ bug... but it may have some others with respect to the '-a' option. PR: bin/39919 Revision Changes Path 1.16.2.3 +7 -2 src/usr.bin/chpass/chpass.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message