rpms/PolicyKit/devel pk-ck-api-change.patch, NONE, 1.1 PolicyKit.spec, 1.20, 1.21
William Jon McCann (mccann)
fedora-extras-commits at redhat.com
Tue Jul 22 23:10:58 UTC 2008
Author: mccann
Update of /cvs/pkgs/rpms/PolicyKit/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26557
Modified Files:
PolicyKit.spec
Added Files:
pk-ck-api-change.patch
Log Message:
- Fix for CK API change
pk-ck-api-change.patch:
--- NEW FILE pk-ck-api-change.patch ---
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);
Index: PolicyKit.spec
===================================================================
RCS file: /cvs/pkgs/rpms/PolicyKit/devel/PolicyKit.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- PolicyKit.spec 22 Jul 2008 18:22:59 -0000 1.20
+++ PolicyKit.spec 22 Jul 2008 23:10:14 -0000 1.21
@@ -14,11 +14,12 @@
Summary: Authorization Toolkit
Name: PolicyKit
Version: 0.9
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://gitweb.freedesktop.org/?p=PolicyKit.git;a=summary
Source0: http://hal.freedesktop.org/releases/%{name}-%{version}.tar.gz
+Patch1: pk-ck-api-change.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires(post): chkconfig
Requires(preun): chkconfig
@@ -73,6 +74,7 @@
%prep
%setup -q
+%patch1 -p1 -b .api-change
%build
%configure
@@ -166,6 +168,9 @@
%{_datadir}/gtk-doc/html/polkit/*
%changelog
+* Tue Jul 22 2008 Jon McCann <jmccann at redhat.com> - 0.9-2%{?dist}
+- Fix for CK API change
+
* Tue Jul 22 2008 David Zeuthen <davidz at redhat.com> - 0.9-1%{?dist}
- Upstream 0.9 release; fixes some file permissions
More information about the fedora-extras-commits
mailing list