summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--plugins/datetime/msd-datetime-mechanism.c10
2 files changed, 9 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 3b73ec7..f4311ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -349,7 +349,7 @@ AC_SUBST(NSS_DATABASE)
# PolicyKit
# ---------------------------------------------------------------------------
-POLKIT_REQUIRED=0.91
+POLKIT_REQUIRED=0.97
DBUS_REQUIRED=1.1.2
# PolicyKit detection; defaults to 'auto' (use it if it's available)
diff --git a/plugins/datetime/msd-datetime-mechanism.c b/plugins/datetime/msd-datetime-mechanism.c
index f03018f..6fc3399 100644
--- a/plugins/datetime/msd-datetime-mechanism.c
+++ b/plugins/datetime/msd-datetime-mechanism.c
@@ -176,9 +176,15 @@ register_mechanism (MsdDatetimeMechanism *mechanism)
{
GError *error = NULL;
- mechanism->priv->auth = polkit_authority_get ();
+ mechanism->priv->auth = polkit_authority_get_sync (NULL, &error);
+ if (mechanism->priv->auth == NULL) {
+ if (error != NULL) {
+ g_critical ("error getting system bus: %s", error->message);
+ g_error_free (error);
+ }
+ goto error;
+ }
- error = NULL;
mechanism->priv->system_bus_connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
if (mechanism->priv->system_bus_connection == NULL) {
if (error != NULL) {