[Pkg-utopia-commits] r2851 - in /packages/unstable/policykit/debian: changelog patches/03_consolekit0.3-api.patch patches/series

biebl at users.alioth.debian.org biebl at users.alioth.debian.org
Wed Feb 18 16:18:36 UTC 2009


Author: biebl
Date: Wed Feb 18 16:18:35 2009
New Revision: 2851

URL: http://svn.debian.org/wsvn/pkg-utopia/?sc=1&rev=2851
Log:
* debian/patches/03_consolekit0.3-api.patch
  - Try both the ConsoleKit 0.3 and the older 0.2 API, to work with either.
    Patch pulled from Ubuntu.

Added:
    packages/unstable/policykit/debian/patches/03_consolekit0.3-api.patch
Modified:
    packages/unstable/policykit/debian/changelog
    packages/unstable/policykit/debian/patches/series

Modified: packages/unstable/policykit/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/policykit/debian/changelog?rev=2851&op=diff
==============================================================================
--- packages/unstable/policykit/debian/changelog (original)
+++ packages/unstable/policykit/debian/changelog Wed Feb 18 16:18:35 2009
@@ -10,6 +10,9 @@
   * debian/rules
     - Include debhelper.mk before any other files as recommended by the cdbs
       documentation.
+  * debian/patches/03_consolekit0.3-api.patch
+    - Try both the ConsoleKit 0.3 and the older 0.2 API, to work with either.
+      Patch pulled from Ubuntu.
 
  -- Michael Biebl <biebl at debian.org>  Wed, 18 Feb 2009 15:49:26 +0100
 

Added: packages/unstable/policykit/debian/patches/03_consolekit0.3-api.patch
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/policykit/debian/patches/03_consolekit0.3-api.patch?rev=2851&op=file
==============================================================================
--- packages/unstable/policykit/debian/patches/03_consolekit0.3-api.patch (added)
+++ packages/unstable/policykit/debian/patches/03_consolekit0.3-api.patch Wed Feb 18 16:18:35 2009
@@ -1,0 +1,86 @@
+# Description: Make PolicyKit work with ConsoleKit 0.3 API as well
+# Ubuntu: https://bugs.launchpad.net/273711
+# Upstream: http://cvs.fedoraproject.org/viewvc/rpms/PolicyKit/devel/pk-ck-api-change.patch?view=markup
+--- policykit-0.9/src/polkit-dbus/polkit-dbus.c	2008-05-30 23:24:44.000000000 +0200
++++ policykit-0.9.new/src/polkit-dbus/polkit-dbus.c	2008-09-24 13:40:37.000000000 +0200
+@@ -214,11 +214,17 @@
+                                 dbus_message_unref (reply);
+                         goto out;
+                 }
++                /* GetUnixUser API Changed in CK 0.3.0 */
+                 if (!dbus_message_get_args (reply, NULL,
+-                                            DBUS_TYPE_INT32, &uid,
++                                            DBUS_TYPE_UINT32, &uid,
+                                             DBUS_TYPE_INVALID)) {
+-                        kit_warning ("Invalid GetUnixUser reply from CK");
+-                        goto out;
++                        /* try the older API */
++                        if (!dbus_message_get_args (reply, NULL,
++                                                    DBUS_TYPE_INT32, &uid,
++                                                    DBUS_TYPE_INVALID)) {
++                                kit_warning ("Invalid GetUnixUser reply from CK");
++                                goto out;
++                        }
+                 }
+                 dbus_message_unref (message);
+                 dbus_message_unref (reply);
+@@ -1326,16 +1332,21 @@
+ 
+                 dbus_error_init (&error);
+                 seat_objpath = dbus_message_get_path (message);
+-                if (!dbus_message_get_args (message, &error, 
+-                                            DBUS_TYPE_STRING, &session_objpath, 
++                /* API fixed in CK 0.3 to match spec */
++                if (!dbus_message_get_args (message, &error,
++                                            DBUS_TYPE_OBJECT_PATH, &session_objpath,
+                                             DBUS_TYPE_INVALID)) {
++                        if (!dbus_message_get_args (message, &error,
++                                                    DBUS_TYPE_STRING, &session_objpath,
++                                                    DBUS_TYPE_INVALID)) {
++
++                                /* TODO: should be _pk_critical */
++                                kit_warning ("The SessionAdded signal on the org.freedesktop.ConsoleKit.Seat "
++                                             "interface for object %s has the wrong signature! "
++                                             "Your system is misconfigured.", seat_objpath);
+ 
+-                        /* TODO: should be _pk_critical */
+-                        kit_warning ("The SessionAdded signal on the org.freedesktop.ConsoleKit.Seat "
+-                                   "interface for object %s has the wrong signature! "
+-                                   "Your system is misconfigured.", seat_objpath);
+-
+-                        goto out;
++                                goto out;
++                        }
+                 }
+ 
+                 /* TODO: add to sessions - see polkit_tracker_is_authorization_relevant() */
+@@ -1353,16 +1364,21 @@
+ 
+                 dbus_error_init (&error);
+                 seat_objpath = dbus_message_get_path (message);
+-                if (!dbus_message_get_args (message, &error, 
+-                                            DBUS_TYPE_STRING, &session_objpath, 
++                /* API fixed in CK 0.3 to match spec */
++                if (!dbus_message_get_args (message, &error,
++                                            DBUS_TYPE_OBJECT_PATH, &session_objpath,
+                                             DBUS_TYPE_INVALID)) {
++                        if (!dbus_message_get_args (message, &error,
++                                                    DBUS_TYPE_STRING, &session_objpath,
++                                                    DBUS_TYPE_INVALID)) {
++
++                                /* TODO: should be _pk_critical */
++                                kit_warning ("The SessionRemoved signal on the org.freedesktop.ConsoleKit.Seat "
++                                             "interface for object %s has the wrong signature! "
++                                             "Your system is misconfigured.", seat_objpath);
+ 
+-                        /* TODO: should be _pk_critical */
+-                        kit_warning ("The SessionRemoved signal on the org.freedesktop.ConsoleKit.Seat "
+-                                   "interface for object %s has the wrong signature! "
+-                                   "Your system is misconfigured.", seat_objpath);
+-
+-                        goto out;
++                                goto out;
++                        }
+                 }
+ 
+                 _remove_caller_by_session (pk_tracker, session_objpath);

Modified: packages/unstable/policykit/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/policykit/debian/patches/series?rev=2851&op=diff
==============================================================================
--- packages/unstable/policykit/debian/patches/series (original)
+++ packages/unstable/policykit/debian/patches/series Wed Feb 18 16:18:35 2009
@@ -1,2 +1,3 @@
 01_pam_polkit.patch
 02_dbus_policy.patch
+03_consolekit0.3-api.patch




More information about the Pkg-utopia-commits mailing list