From 2e9e0f85053b3bfd51b01046ccc18624d9776678 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 08 Nov 2007 22:37:15 +0000 Subject: Add an hardcoded list of activities which are launched outside rainbow containers. --- (limited to 'lib') 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: -- cgit v0.9.1