Re: [sqlite] Set read-only mode

2009-03-08 Thread Roger Binns
Tom Spencer wrote: > I did actually think of chmodding the file with every connection. The sqlite3_open_v2 call does let you specify SQLITE_OPEN_READONLY. If your wrapper doesn't provide this then the simplest thing would be to update the wrapper. http://www.sqlite.org/c3ref/open.html

Re: [sqlite] Set read-only mode

2009-03-08 Thread Tom Spencer
Thanks, Alexey! I'll experiment with this. On Sun, Mar 8, 2009 at 8:08 AM, Alexey Pechnikov wrote: > Hello! > >> I too am puzzled. Perhaps the app involves a web server accepting any >> bunch of text from anybody who knows the URL and just running the text >> as an SQL

Re: [sqlite] Set read-only mode

2009-03-08 Thread Alexey Pechnikov
Hello! > I too am puzzled. Perhaps the app involves a web server accepting any > bunch of text from anybody who knows the URL and just running the text > as an SQL query -- i.e. read-only is perceived to be a last-ditch > (only?) defence against an SQL injection attack. There is "authorizer"

Re: [sqlite] Set read-only mode

2009-03-07 Thread John Machin
On 8/03/2009 4:27 AM, P Kishor wrote: > On Sat, Mar 7, 2009 at 10:59 AM, Tom Spencer wrote: >> Is there a way to set the current database handle as read-only? I'm >> connecting to an SQLite3 database (actually two including an attached >> database) using Perl with

Re: [sqlite] Set read-only mode

2009-03-07 Thread P Kishor
On Sat, Mar 7, 2009 at 10:59 AM, Tom Spencer wrote: > Is there a way to set the current database handle as read-only?  I'm > connecting to an SQLite3 database (actually two including an attached > database) using Perl with DBD::SQLite, which doesn't seem to implement > the

[sqlite] Set read-only mode

2009-03-07 Thread Tom Spencer
Is there a way to set the current database handle as read-only? I'm connecting to an SQLite3 database (actually two including an attached database) using Perl with DBD::SQLite, which doesn't seem to implement the ReadOnly database handle attribute. Is there some kind of setting or pragma that