On 8 Apr 2015, at 3:51pm, R.Smith <rsmith at rsweb.co.za> wrote:

> BEGIN EXCLUSIVE - Locks the database from other SQLite3 database connections 
> for the time being.
> COMMIT; - Unlocks it again - so calling all this in one go is pointless.
> 
> That said, database locking serves only to protect from other database 
> changes... There is no way to prevent a user from intentional messing with 
> any file if they have the privileges to do so.

Correct.  Part of my testing for setup security is as follows:

Open a sqlite database file in a text editor (NOTEPAD.EXE, TextEdit, whatever). 
 Type some gibberish characters at a few places in the file.  Wait until an app 
is using it via SQLite calls.  Hit 'Save'.

You can't do anything to prevent it.  But your business procedure (whatever 
software you run, whatever corruption testing you do, whatever corruption 
testing your software does) needs to be able to detect the problem and raise an 
alarm.

Simon.

Reply via email to