From 2e9e0f85053b3bfd51b01046ccc18624d9776678 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 8 Nov 2007 23:37:15 +0100 Subject: [PATCH] Add an hardcoded list of activities which are launched outside rainbow containers. --- lib/sugar/activity/activityfactory.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/sugar/activity/activityfactory.py b/lib/sugar/activity/activityfactory.py index 8e49e948..2319f9b3 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: