[prev in list] [next in list] [prev in thread] [next in thread]
List: klik-devel
Subject: [klik-devel] [klikclient commit] r953 -
From: codesite-noreply () google ! com
Date: 2008-01-29 2:12:26
Message-ID: 00163646d2300444d2f4b45d0aae576 () google ! com
[Download RAW message or body]
Author: KillerKiwi2005
Date: Mon Jan 28 18:11:45 2008
New Revision: 953
Modified:
trunk/client/trunk/klikclient/lib/klik/base.py
Log:
Auto Jail based upon existing folders
Modified: trunk/client/trunk/klikclient/lib/klik/base.py
==============================================================================
--- trunk/client/trunk/klikclient/lib/klik/base.py (original)
+++ trunk/client/trunk/klikclient/lib/klik/base.py Mon Jan 28 18:11:45 2008
@@ -24,6 +24,7 @@
from klik.exception import SafeException
from klik.utils.freedesktop import DesktopParser
from klik.utils.debian import MenuParser
+from klik.utils.notify import Notify
import klik.utils.freedesktop
# Declare available events
@@ -40,6 +41,7 @@
self.create = KlikCreate(self)
self.settings = KlikSettings()
self.xdg = XdgUtils()
+ self.notify = Notify()
self.create.events.on_download_progress += self.__download_progress
self.create.events.print_to_stdout += self.print_to_stdout
@@ -213,9 +215,23 @@
else:
if len(desktop_objects) > 0:
- exec_array = desktop_objects[0].get_exec_array()
+ desktop_object = desktop_objects[0]
+ exec_array = desktop_object.get_exec_array()
command = exec_array[0]
- return ex.execute( command, cmg_path, args, capture_error )
+
+ return ex.execute( command, cmg_path, args, capture_error,
self.check_for_sandbox(cmg_path) )
+
+ def check_for_sandbox(self, cmg_path):
+ basename = os.path.basename(cmg_path)
+ basepath = os.path.dirname(cmg_path)
+ # .app.cmg, app.cmg.data
+ paths = [os.path.join(basepath, "." + basename),
os.path.join(basepath, basename + ".data")]
+ for path in paths:
+ if os.path.exists( path ) and os.access(path, os.X_OK) and
os.access(path, os.W_OK):
+ self.notify.show( "Application Started in Jail" ,
path , "application-x-extension-cmg" )
+ return path
+
+ return None
def check_for_missing_library(self, command, cmg_path):
ex = KlikExecute(self)
_______________________________________________
klik-devel mailing list
klik-devel@kde.org
https://mail.kde.org/mailman/listinfo/klik-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic