[gnome-lirc-properties] Fix traceback on start with new PolicyKit
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-lirc-properties] Fix traceback on start with new PolicyKit
- Date: Thu, 27 May 2010 15:34:08 +0000 (UTC)
commit c3a6e62af251da0d38308612818a0811ffd04565
Author: Bastien Nocera <hadess hadess net>
Date: Thu May 27 16:01:33 2010 +0100
Fix traceback on start with new PolicyKit
From PolicyKit 0.95, the "start-time" portion of a unix-process
became necessary, as PolicyKit checks for its presence when
validating for arguments.
We now pass a start-time of '0' so that gnome-lirc-properties
doesn't traceback with a remote error, and the daemon checks
for the start-time in /proc
https://bugzilla.gnome.org/show_bug.cgi?id=619389
Work-around:
https://bugs.freedesktop.org/show_bug.cgi?id=28228
gnome_lirc_properties/policykit.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gnome_lirc_properties/policykit.py b/gnome_lirc_properties/policykit.py
index 750883c..e5a16a8 100644
--- a/gnome_lirc_properties/policykit.py
+++ b/gnome_lirc_properties/policykit.py
@@ -41,7 +41,7 @@ class PolicyKitAuthentication(object):
# Check whether the process is authorized:
pid = os.getpid()
(is_auth, _, details) = self.policy_kit.CheckAuthorization(
- ('unix-process', {'pid': dbus.UInt32(pid, variant_level=1)}),
+ ('unix-process', {'pid': dbus.UInt32(pid, variant_level=1), 'start-time':dbus.UInt64(0,variant_level=1)}),
action_id, {}, dbus.UInt32(0), '', timeout=600)
logging.debug('%s: authorized=%r', action_id, is_auth)
@@ -57,7 +57,7 @@ class PolicyKitAuthentication(object):
pid = os.getpid()
(granted, _, details) = self.policy_kit.CheckAuthorization(
- ('unix-process', {'pid': dbus.UInt32(pid, variant_level=1)}),
+ ('unix-process', {'pid': dbus.UInt32(pid, variant_level=1), 'start-time':dbus.UInt64(0,variant_level=1)}),
action_id, {}, dbus.UInt32(1), '', timeout=600)
logging.debug('%s: granted=%r', action_id, granted)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]