Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/olpc/datastore/backingstore.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/olpc/datastore/backingstore.py')
-rw-r--r--src/olpc/datastore/backingstore.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/olpc/datastore/backingstore.py b/src/olpc/datastore/backingstore.py
index e32cce8..4445e40 100644
--- a/src/olpc/datastore/backingstore.py
+++ b/src/olpc/datastore/backingstore.py
@@ -364,7 +364,9 @@ class FileBackingStore(BackingStore):
if not ext.startswith('.'): ext = ".%s" % ext
targetpath = "%s%s" % (targetpath, ext)
- if os.path.exists('/etc/olpc-security'):
+ use_instance_dir = os.path.exists('/etc/olpc-security') and \
+ os.getuid() != self.current_user_id
+ if use_instance_dir:
if not self.current_user_id:
raise ValueError("Couldn't determine the current user uid.")
base = os.path.join('/activities', 'uid_to_instance_dir',