Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-11-08 22:37:15 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-11-08 22:37:15 (GMT)
commit2e9e0f85053b3bfd51b01046ccc18624d9776678 (patch)
tree601ad48c04c48989c1d41aed6a9d66e2423713ed /lib
parent1879b9d140fd1eb07a9e61ecb2bae1fb5f896dc7 (diff)
Add an hardcoded list of activities which are launched
outside rainbow containers.
Diffstat (limited to 'lib')
-rw-r--r--lib/sugar/activity/activityfactory.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/sugar/activity/activityfactory.py b/lib/sugar/activity/activityfactory.py
index 8e49e94..2319f9b 100644
--- a/lib/sugar/activity/activityfactory.py
+++ b/lib/sugar/activity/activityfactory.py
@@ -165,9 +165,17 @@ class ActivityCreationHandler(gobject.GObject):
will be delegated to the prototype 'Rainbow' security service.
"""
gobject.GObject.__init__(self)
+
self._service_name = service_name
self._handle = handle
+ self._use_rainbow = os.path.exists('/etc/olpc-security')
+ if handle.activity_id in [ 'org.laptop.JournalActivity',
+ 'org.laptop.Terminal',
+ 'org.laptop.LogViewer',
+ 'org.laptop.Analyze' ]:
+ self._use_rainbow = False
+
bus = dbus.SessionBus()
bus_object = bus.get_object(_SHELL_SERVICE, _SHELL_PATH)
@@ -209,7 +217,7 @@ class ActivityCreationHandler(gobject.GObject):
self._handle.object_id,
self._handle.uri)
- if not os.path.exists('/etc/olpc-security'):
+ if not self._use_rainbow:
process = subprocess.Popen(command, env=environ, cwd=activity.path,
stdout=log_file, stderr=log_file)
else: