[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: db(3) removal and lastlogx
On Sat, Jun 09, 2012 at 08:44:54AM +0200, Martin Husemann wrote:
> I missed the start of this thread and have a stupid question: why are we
> trying to get rid of db(3) in libc?
Because as far as database implementation goes, it is extremely flawed.
The biggest issue is that every program using db(3) in a read-write
environment has to deal with inconsistent data, if the system might have
crashed during a change cycle. I'm not even talking about transactional
integrity, but just plain old "random output".
Using db(3) as constant database is inefficient as best. It comes with
both a significant overhead in terms of database size and CPU cycles.
Considering lastlogx, it seems like the db(3) use provides an
interesting DOS vector. If I run login and SIGSTOP it after it opened
the file with exclusive log, but before it finished writting the entry,
it should provide other instances from doing the same. In other words,
we really want to have a file format that works without any exclusive
lock on the (database) file.
Main Index |
Thread Index |