diff options
| author | Cecil Hugh Watson <knoppmyth@gmail.com> | 2009-09-26 01:57:08 (GMT) | 
|---|---|---|
| committer | Cecil Hugh Watson <knoppmyth@gmail.com> | 2009-09-26 01:57:08 (GMT) | 
| commit | 7b29169fff9e7c624890c5edffe85def8a293136 (patch) | |
| tree | 47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/extra/policykit/pk-ck-api-change.patch | |
| parent | c491dea779dac29afff3578bf8245943817c2339 (diff) | |
| download | linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2 | |
LinHES 6.01.00
Diffstat (limited to 'abs/extra/policykit/pk-ck-api-change.patch')
| -rw-r--r-- | abs/extra/policykit/pk-ck-api-change.patch | 83 | 
1 files changed, 83 insertions, 0 deletions
| diff --git a/abs/extra/policykit/pk-ck-api-change.patch b/abs/extra/policykit/pk-ck-api-change.patch new file mode 100644 index 0000000..ae477f9 --- /dev/null +++ b/abs/extra/policykit/pk-ck-api-change.patch @@ -0,0 +1,83 @@ +diff --git a/src/polkit-dbus/polkit-dbus.c b/src/polkit-dbus/polkit-dbus.c +index f7be03f..cad4a76 100644 +--- a/src/polkit-dbus/polkit-dbus.c ++++ b/src/polkit-dbus/polkit-dbus.c +@@ -214,11 +214,17 @@ polkit_session_new_from_objpath (DBusConnection *con, const char *objpath, uid_t +                                 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 @@ polkit_tracker_dbus_func (PolKitTracker *pk_tracker, DBusMessage *message) +  +                 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 @@ polkit_tracker_dbus_func (PolKitTracker *pk_tracker, DBusMessage *message) +  +                 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); | 
