After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 619389 - Polkit subject struct exception
Polkit subject struct exception
Status: RESOLVED FIXED
Product: gnome-lirc-properties
Classification: Other
Component: general
0.5.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-lirc-properties-maint
gnome-lirc-properties-maint
Depends on:
Blocks:
 
 
Reported: 2010-05-22 22:13 UTC by Eric Anderson
Modified: 2010-05-27 15:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Eric Anderson 2010-05-22 22:13:09 UTC
Today I compiled and ran gnome-lirc-properties-0.5.0 on Arch Linux. I received the following exception:

Traceback (most recent call last):
  • File "/usr/bin/gnome-lirc-properties", line 31 in <module>
    gnome_lirc_properties.run(sys.argv[1:], datadir)
  • File "/usr/lib/python2.6/site-packages/gnome_lirc_properties/__init__.py", line 59 in run
    return ui.RemoteControlProperties(builder, datadir).run()
  • File "/usr/lib/python2.6/site-packages/gnome_lirc_properties/ui/RemoteControlProperties.py", line 56 in __init__
    self.__setup_authorization()
  • File "/usr/lib/python2.6/site-packages/gnome_lirc_properties/ui/RemoteControlProperties.py", line 225 in __setup_authorization
    granted = self.__auth.is_authorized()
  • File "/usr/lib/python2.6/site-packages/gnome_lirc_properties/policykit.py", line 45 in is_authorized
    action_id, {}, dbus.UInt32(0), '', timeout=600)
  • File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 68 in __call__
    return self._proxy_method(*args, **keywords)
  • File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 140 in __call__
    **keywords)
  • File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 630 in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.PolicyKit1.Error.Failed: Error parsing subject struct

I corrected the exception with the help of http://hal.freedesktop.org/docs/polkit/eggdbus-interface-org.freedesktop.PolicyKit1.Authority.html#eggdbus-struct-Subject and http://lists.freedesktop.org/archives/polkit-devel/2009-December/000284.html.

I simply added ",'start-time':dbus.UInt64(0,variant_level=1)" as seen on the polkit-dev list to the polkit calls in is_authorized and obtain_authorization in gnome_lirc_properties/policykit.py to fix the error.

I am using PolicyKit 0.96.
Comment 1 Bastien Nocera 2010-05-24 11:15:39 UTC
This is a regression in PolicyKit, see bug:
https://bugs.freedesktop.org/show_bug.cgi?id=28228
Comment 2 Bastien Nocera 2010-05-27 15:34:33 UTC
Doesn't look like David wants to fix PolicyKit.
Comment 3 Bastien Nocera 2010-05-27 15:34:44 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