1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-23 09:10:43 +00:00
freebsd-ports/sysutils/policykit/files/patch-consolekit03
Joe Marcus Clarke 610ae56816 Presenting GNOME 2.24 for FreeBSD.
See http://library.gnome.org/misc/release-notes/2.24/ for the general
release notes.  On the FreeBSD front, this release introduces Fuse support
in HAL, adds multi-CPU support to libgtop, WebKit updates, and fixes some
long-standing seahorse and gnome-keyring bugs.  The documentation updates
to the website are forthcoming.

This release features commits by adamw, ahze, kwm, mezz, and myself.  It would
not have been possible without are contributors and testers:

Alexander Loginov
Craig Butler [1]
Dmitry Marakasov [6]
Eric L. Chen
Joseph S. Atkinson
Kris Moore
Lapo Luchini [7]
Nikos Ntarmos
Pawel Worach
Romain Tartiere
TAOKA Fumiyoshi [3]
Yasuda Keisuke
Zyl
aZ [4]
bf [2] [5]
Florent Thoumie
Peter Wemm
pluknet

PR:		125857 [1]
		126993 [2]
		130031 [3]
		127399 [4]
		127661 [5]
		124302 [6]
		129570 [7]
		129936
		123790
2009-01-10 05:22:13 +00:00

84 lines
4.8 KiB
Plaintext

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
+++ 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);