From owner-freebsd-bugs Wed Mar 13 3:23:35 2002 Delivered-To: freebsd-bugs@freebsd.org Received: from bazooka.trit.org (bazooka.trit.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id 05B0637B405; Wed, 13 Mar 2002 03:23:23 -0800 (PST) Received: by bazooka.trit.org (Postfix, from userid 1000) id C0F1B3E31; Wed, 13 Mar 2002 11:23:22 +0000 (UTC) Received: from bazooka (localhost [127.0.0.1]) by bazooka.trit.org (Postfix) with ESMTP id BCFB23C12E; Wed, 13 Mar 2002 11:23:22 +0000 (UTC) To: "Crist J. Clark" Cc: billf@FreeBSD.ORG, irys@irc.pl, freebsd-bugs@FreeBSD.ORG Subject: Re: i386/35816: no one can change password, because "passwd DB is locked" In-Reply-To: <20020313025449.R29705@blossom.cjclark.org>; from cjc@FreeBSD.ORG on "Wed, 13 Mar 2002 02:54:49 -0800" Date: Wed, 13 Mar 2002 11:23:17 +0000 From: Dima Dorfman Message-Id: <20020313112322.C0F1B3E31@bazooka.trit.org> Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org "Crist J. Clark" wrote: > On Tue, Mar 12, 2002 at 03:43:52AM -0800, billf@FreeBSD.ORG wrote: > > Synopsis: no one can change password, because "passwd DB is locked" > > > > State-Changed-From-To: open->closed > > State-Changed-By: billf > > State-Changed-When: Tue Mar 12 03:41:48 PST 2002 > > State-Changed-Why: > > this is not a bug. root can find the process that is holding the lock > > on the password database and kill both it and the user holding it. > > This does look like a bug to me. I don't understand why chpass(1) > needs to hold a lock on the database while the user is editing his > entry. It seems like once the user is done editing, _then_ the > master.passwd can be locked, the user's modifications checked, and > then added if they are OK. Why would it need to be locked during the > editing process? I don't see a good reason looking at the code. What happens if the data for that user changes between the time the editor is started (with the old info filled in) and the time the user is done editing? Assuming all the changes are valid, it would still be technically okay to apply the new changes, but it might come as a surprise to one or both of the parties involved. The above is intended as food for thought, not a flat-out rejection of your idea; it isn't clear whether this should be allowed to happen, or what we should do if it does. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message