[packagekit] Building against PolicyKit 0.7
S.Çağlar Onur
caglar at pardus.org.tr
Sun Dec 9 22:45:21 PST 2007
Hi;
Monday 10 December 2007 06:00:47 tarihinde Matthias Clasen şunları yazmıştı:
> Thanks to the wonders of -Werror, PackageKit won't build against PolicyKit 0.7.
> Here is a patch that fixes it.
>
I think following bits also needed :), if there is no objection i'll commit this one;
diff --git a/configure.ac b/configure.ac
index a15e478..fb7b697 100755
--- a/configure.ac
+++ b/configure.ac
@@ -57,8 +57,8 @@ GLIB_REQUIRED=2.14.0
DBUS_REQUIRED=1.1.1
DBUS_GLIB_REQUIRED=0.73
LIBNM_GLIB_REQUIRED=0.6.4
-POLKIT_DBUS_REQUIRED=0.5
-POLKIT_GRANT_REQUIRED=0.5
+POLKIT_DBUS_REQUIRED=0.7
+POLKIT_GRANT_REQUIRED=0.7
dnl ---------------------------------------------------------------------------
dnl - Make above strings available for packaging files (e.g. rpm spec files)
@@ -229,7 +229,7 @@ AC_ARG_WITH([security_framework],
[Default security framework to use polkit,dummy]))
# try and guess this if nothing is listed
if test x$with_security_framework = x; then
- if test -f /usr/bin/polkit-list-actions ; then
+ if test -f /usr/bin/polkit-action ; then
with_security_framework=polkit
else
AC_MSG_ERROR([--with-security-framework explicitly required when not using PolicyKit or RBAC])
diff --git a/src/pk-security-polkit.c b/src/pk-security-polkit.c
index 971e43c..471d950 100644
--- a/src/pk-security-polkit.c
+++ b/src/pk-security-polkit.c
@@ -85,6 +85,7 @@ pk_security_can_do_action (PkSecurity *security, const gchar *dbus_sender, const
}
pk_result = polkit_context_can_caller_do_action (security->priv->pk_context, pk_action, pk_caller);
+ pk_result = polkit_context_is_caller_authorized (security->priv->pk_context, pk_action, pk_caller, TRUE, NULL);
pk_debug ("PolicyKit result = '%s'", polkit_result_to_string_representation (pk_result));
polkit_action_unref (pk_action);
Cheers
More information about the PackageKit
mailing list