Subject: Re: pwdb busy
To: Ted Lemon <>
From: Perry E. Metzger <>
List: current-users
Date: 06/24/1997 17:28:26
Ted Lemon writes:
> > > perhaps just change chfn to acquire the lock after it knows it has
> > > stuff to change?
> > 
> > Sounds pretty good to me, unless there are some complications I can't
> > see right now.
> This doesn't work because somebody could make conflicting changes.

Its actually probably okay in this instance. Remember that in general,
only one user will be changing their one password line at a
time. Others might be altering other lines of the password file, but
thats okay. If someone else logged in as the same user makes the
change, well, the user is screwed, but thats okay.

The Right Thing, IMHO, is for chfn to save information about the one
line it is editing at the start and to check to make sure the line it
is changing is unchanged after the user enters the new data and the
lock has been made -- it should bail out if a change occurred to that
line in the interim. As I noted, changes to other lines aren't