Use polkit_authority_get_sync() instead.
This was introduced in polkit-1 commit
322513b0d, thus bump the configure.ac
check to 0.97.
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
AC_SUBST(DBUS_GLIB_CFLAGS)
AC_SUBST(DBUS_GLIB_LIBS)
-PKG_CHECK_MODULES(POLKIT_GOBJECT_1, [polkit-gobject-1 >= 0.92])
+PKG_CHECK_MODULES(POLKIT_GOBJECT_1, [polkit-gobject-1 >= 0.97])
AC_SUBST(POLKIT_GOBJECT_1_CFLAGS)
AC_SUBST(POLKIT_GOBJECT_1_LIBS)
-PKG_CHECK_MODULES(POLKIT_BACKEND_1, [polkit-backend-1 >= 0.92])
+PKG_CHECK_MODULES(POLKIT_BACKEND_1, [polkit-backend-1 >= 0.97])
AC_SUBST(POLKIT_BACKEND_1_CFLAGS)
AC_SUBST(POLKIT_BACKEND_1_LIBS)
"sas_expander", /* SAS Expanders */
NULL };
- daemon->priv->authority = polkit_authority_get ();
+ daemon->priv->authority = polkit_authority_get_sync ((GCancellable *) NULL, &error);
+ if (daemon->priv->authority == NULL)
+ {
+ if (error != NULL)
+ {
+ g_critical ("error getting authority reference: %s", error->message);
+ g_error_free (error);
+ }
+ goto error;
+ }
error = NULL;
daemon->priv->system_bus_connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);