Subject: Re: pwdb busy
To: Dave McGuire <mcguire@neurotica.com>
From: Andrew Brown <codewarrior@daemon.org>
List: current-users
Date: 06/24/1997 14:06:15
> From: Dave McGuire
>> On June 24, Jukka Marin wrote:
>> > On Tue, Jun 24, 1997 at 10:38:11AM -0400, Dave McGuire wrote:
>> > > On June 24, Jukka Marin wrote:
>> > > 4. user manages to suspend and kill -9 vi
>> > 
>> >   Yes.  Too many people think "kill -9" is the *only* way to kill a
>> > process.  I even know someone who aliased "kill" to "kill -9".  *sigh*
>> 
>> Well, there should be _no_ way for a normal user to lock an essential
>> file (resource) like this.  IMHO.
>
>  I would have to agree.

two issues:

first of all, how are users supposed to change that info then?  it has
to lock the database, and the program has to be suid.  unless you
wanna have a client/server thing going on with maybe unix domain
sockets or something, or go the fascist way of solaris where you
can't.

secondly, the database wouldn't still be locked if the user could see
the chfn process still hanging out.  this is what has actually locked
the database.  they don't see it because it doesn't show up in normal
ps output (since it's owned by root).  after they "kill" the vi
process, it becomes a zombie unless they also take care of the chfn
process.  now, if they kill this (which they can since they also "own"
it) the password database will be locked until unlocked by root.

maybe chfn needs an alarm to wake it up in case of only the vi process
being killed?  maybe chfn needs to change it's process group (would
that do it?) so that normal user's can't kill -9 it and leave the
database locked?

-- 
|-----< "CODE WARRIOR" >-----|
andrew@echonyc.com (TheMan)        * "ah!  i see you have the internet
codewarrior@daemon.org                               that goes *ping*!"
warfare@graffiti.com      * "information is power -- share the wealth."