zeitgeist team mailing list archive
-
zeitgeist team
-
Mailing list archive
-
Message #04562
[Branch ~zeitgeist/zeitgeist/bluebird] Rev 370: estrict database read permissions to the user
------------------------------------------------------------
revno: 370
fixes bug: https://launchpad.net/bugs/910273
committer: Siegfried-Angel Gevatter Pujals <siegfried@xxxxxxxxxxxx>
branch nick: bluebird-chmod
timestamp: Wed 2012-01-25 13:25:26 +0100
message:
estrict database read permissions to the user
modified:
NEWS
src/sql-schema.vala
--
lp:zeitgeist
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.
To unsubscribe from this branch go to https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird/+edit-subscription
=== modified file 'NEWS'
--- NEWS 2011-12-29 14:39:51 +0000
+++ NEWS 2012-01-25 12:25:26 +0000
@@ -8,6 +8,7 @@
- The language for extensions has changes from Python to Vala.
- The post_get_events hook is no longer supported.
+ - The database file is now only readable by the user.
Python API:
- ...
@@ -108,6 +109,8 @@
- Do not print a traceback when Zeitgeist fails to start because another
instance is already running, just show a plain error message (LP: #744818).
- Simplified log output format when printing to stderr.
+ - Introduce new DB schema (version 4), adding storage, current_uri and event
+ origin.
Python API:
=== modified file 'src/sql-schema.vala'
--- src/sql-schema.vala 2011-12-31 19:15:54 +0000
+++ src/sql-schema.vala 2012-01-25 12:25:26 +0000
@@ -94,6 +94,9 @@
public static void create_schema (Sqlite.Database database)
throws EngineError
{
+ if (!Utils.using_in_memory_database ())
+ FileUtils.chmod (Utils.get_database_file_path (), 0600);
+
exec_query (database, "PRAGMA journal_mode = WAL");
exec_query (database, "PRAGMA locking_mode = EXCLUSIVE");