D. Richard Hipp wrote:

You present a new and novel approach to corrupting the database, which
is to combine a database file with a journal from a different database
into the same directory.  We'll be thinking about what to prevent this
attack in the 6 days that remain before we freeze the 3.0.0 database
format.

Two possible solutions::

a.) If you create a new database, check if a journal file with the right name exits already and delete it.

b.) When you create a new database, calculate a hash of some pseudo random sources like current date and time and current pid and store this id in the database. Copy this database id to every journal file you create in action of an transaction on this database.
Before you rollback a journal file, compare the database in the journal file with the id of the database file itself.
It must not be bulletproof. Just reduce the chance to a ratio like 1/(2^32 )or something.



cu

Michael


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to