Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-11-09 14:39:27 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-11-09 14:39:27 (GMT)
commit62a5c30d813c3c6a37d42cf40291afc9a887bd9f (patch)
tree08c21e1fdeee3c50db20b9c0ce82dc87b5a9aff6
parent255aec5bbb377dee52b58e4fcdb1b390e05d939e (diff)
Copy files to the profile dir when asked by an out-of-container process.
-rw-r--r--NEWS2
-rw-r--r--src/olpc/datastore/backingstore.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 59c174c..72aa051 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+* Copy files to the profile dir when asked by an out-of-container process. (tomeu)
+
Snapshot 3b70954e71
* #3801 Check out files in the activity instance dir with the correct
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',