[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Bug in passwd program


I'm playing around with lckpwdf() and ulckpwdf() under RedHat 4.1 and
I was testing that my ideas were correct and that a lock really is held
on the subsystem.

Well, my program seems to work... it locks other instances of the same
program out, and when I run "passwd", passwd pauses for 15 seconds before
it updates the passwd database... therein lies the problem.

If "passwd" can't acquire a lock it seems that it doesn't care - it'll
just update the passwd database anyway. It does wait 15 seconds but my
guess is that it doesn't test the return value from lckpwdf() - it just
seems to roll on regardless.

I've not been too current on the PAM list recently so please excuse me if
this is an already known problem and also for not looking at the source
myself (I'm a bit busy with my own source at the moment!)... or if it's
my dodgy programming that's the problem! ;-)   However if I have a lock
on a file it shouldn't matter how long I hold it, the lock should be
valid until I unlock it or the holding process terminates... IMO.


...and I guess that's your accomplice, in the woodchipper?

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []