diff --git a/applets/clock/Makefile.am b/applets/clock/Makefile.am
index da5e0d9..78bacf9 100644
--- a/applets/clock/Makefile.am
+++ b/applets/clock/Makefile.am
@@ -7,7 +7,7 @@ INCLUDES =							\
 	$(GNOME_INCLUDEDIR)					\
 	$(WARN_CFLAGS)						\
 	$(CLOCK_CFLAGS)						\
-	$(POLKIT_CFLAGS)					\
+	$(POLKIT_GNOME_CFLAGS)					\
 	$(LIBPANEL_APPLET_CFLAGS)				\
 	-DDATADIR=\""$(datadir)"\"				\
 	-DBUILDERDIR=\""$(uidir)"\"				\
@@ -65,7 +65,7 @@ CLOCK_LDADD =						\
 	../../libpanel-applet/libpanel-applet-2.la	\
 	$(CLOCK_LIBS)					\
 	$(LIBPANEL_APPLET_LIBS)				\
-	$(POLKIT_LIBS)				\
+	$(POLKIT_GNOME_LIBS)				\
 	-lgweather
 
 BUILT_SOURCES =					\
@@ -130,11 +130,11 @@ endif
 
 gnome_clock_applet_mechanism_INCLUDES =	\
 	$(CLOCK_MECHANISM_CFLAGS) 	\
-	$(POLKIT_CFLAGS)
+	$(POLKIT_GNOME_CFLAGS)
 
 gnome_clock_applet_mechanism_LDADD =	\
 	$(CLOCK_MECHANISM_LIBS)		\
-	$(POLKIT_LIBS)
+	$(POLKIT_GNOME_LIBS)
 
 if CLOCK_INPROCESS
 APPLET_TYPE     = shlib
@@ -203,7 +203,7 @@ endif
 
 dbus_servicesdir = $(datadir)/dbus-1/system-services
 dbus_confdir = $(sysconfdir)/dbus-1/system.d
-polkitdir = $(datadir)/polkit-1/actions
+polkitdir = $(datadir)/PolicyKit/policy
 
 dbus_services_in_files = org.gnome.ClockApplet.Mechanism.service.in
 polkit_in_files = org.gnome.clockapplet.mechanism.policy.in
diff --git a/applets/clock/clock-location.c b/applets/clock/clock-location.c
index 1b81c51..ddf709e 100644
--- a/applets/clock/clock-location.c
+++ b/applets/clock/clock-location.c
@@ -577,7 +577,8 @@ clock_location_make_current (ClockLocation *loc,
 
         filename = g_build_filename (SYSTEM_ZONEINFODIR, priv->timezone, NULL);
         set_system_timezone_async (filename,
-                                   (GFunc)make_current_cb,
+				   transient_parent_xid,
+                                   (GFunc)make_current_cb, 
 				   mcdata,
                                    free_make_current_data);
         g_free (filename);
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 7ee7273..3d96f4c 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -1738,7 +1738,7 @@ set_time (GtkWidget *widget, ClockData *cd)
 
 	tim = mktime (&t);
 
-	set_system_time_async (tim, (GFunc)set_time_callback, cd, NULL);
+	set_system_time_async (tim, GDK_WINDOW_XWINDOW (cd->applet->window), (GFunc)set_time_callback, cd, NULL);
 }
 
 static void
diff --git a/applets/clock/gnome-clock-applet-mechanism.c b/applets/clock/gnome-clock-applet-mechanism.c
index b5ee23e..9fb0930 100644
--- a/applets/clock/gnome-clock-applet-mechanism.c
+++ b/applets/clock/gnome-clock-applet-mechanism.c
@@ -37,7 +37,7 @@
 #include <dbus/dbus-glib.h>
 #include <dbus/dbus-glib-lowlevel.h>
 
-#include <polkit/polkit.h>
+#include <polkit-dbus/polkit-dbus.h>
 
 #include "system-timezone.h"
 
@@ -68,7 +68,7 @@ struct GnomeClockAppletMechanismPrivate
 {
         DBusGConnection *system_bus_connection;
         DBusGProxy      *system_bus_proxy;
-        PolkitAuthority *auth;
+        PolKitContext   *pol_ctx;
 };
 
 static void     gnome_clock_applet_mechanism_finalize    (GObject     *object);
@@ -172,11 +172,50 @@ gnome_clock_applet_mechanism_finalize (GObject *object)
 }
 
 static gboolean
+pk_io_watch_have_data (GIOChannel *channel, GIOCondition condition, gpointer user_data)
+{
+        int fd;
+        PolKitContext *pk_context = user_data;
+        fd = g_io_channel_unix_get_fd (channel);
+        polkit_context_io_func (pk_context, fd);
+        return TRUE;
+}
+
+static int 
+pk_io_add_watch (PolKitContext *pk_context, int fd)
+{
+        guint id = 0;
+        GIOChannel *channel;
+        channel = g_io_channel_unix_new (fd);
+        if (channel == NULL)
+                goto out;
+        id = g_io_add_watch (channel, G_IO_IN, pk_io_watch_have_data, pk_context);
+        if (id == 0) {
+                g_io_channel_unref (channel);
+                goto out;
+        }
+        g_io_channel_unref (channel);
+out:
+        return id;
+}
+
+static void 
+pk_io_remove_watch (PolKitContext *pk_context, int watch_id)
+{
+        g_source_remove (watch_id);
+}
+
+static gboolean
 register_mechanism (GnomeClockAppletMechanism *mechanism)
 {
         GError *error = NULL;
 
-        mechanism->priv->auth = polkit_authority_get ();
+        mechanism->priv->pol_ctx = polkit_context_new ();
+        polkit_context_set_io_watch_functions (mechanism->priv->pol_ctx, pk_io_add_watch, pk_io_remove_watch);
+        if (!polkit_context_init (mechanism->priv->pol_ctx, NULL)) {
+                g_critical ("cannot initialize libpolkit");
+                goto error;
+        }
 
         error = NULL;
         mechanism->priv->system_bus_connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
@@ -227,36 +266,50 @@ _check_polkit_for_action (GnomeClockAppletMechanism *mechanism, DBusGMethodInvoc
 {
         const char *sender;
         GError *error;
-        PolkitSubject *subject;
-        PolkitAuthorizationResult *result;
+        DBusError dbus_error;
+        PolKitCaller *pk_caller;
+        PolKitAction *pk_action;
+        PolKitResult pk_result;
 
         error = NULL;
 
         /* Check that caller is privileged */
         sender = dbus_g_method_get_sender (context);
-        subject = polkit_system_bus_name_new (sender);
+        dbus_error_init (&dbus_error);
+        pk_caller = polkit_caller_new_from_dbus_name (
+                dbus_g_connection_get_connection (mechanism->priv->system_bus_connection),
+                sender, 
+                &dbus_error);
+        if (pk_caller == NULL) {
+                error = g_error_new (GNOME_CLOCK_APPLET_MECHANISM_ERROR,
+                                     GNOME_CLOCK_APPLET_MECHANISM_ERROR_GENERAL,
+                                     "Error getting information about caller: %s: %s",
+                                     dbus_error.name, dbus_error.message);
+                dbus_error_free (&dbus_error);
+                dbus_g_method_return_error (context, error);
+                g_error_free (error);
+                return FALSE;
+        }
 
-        result = polkit_authority_check_authorization_sync (mechanism->priv->auth,
-                                                            subject,
-                                                            action,
-                                                            NULL,
-                                                            POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION,
-                                                            NULL, NULL);
-        g_object_unref (subject);
+        pk_action = polkit_action_new ();
+        polkit_action_set_action_id (pk_action, action);
+        pk_result = polkit_context_is_caller_authorized (mechanism->priv->pol_ctx, pk_action, pk_caller, FALSE, NULL);
+        polkit_caller_unref (pk_caller);
+        polkit_action_unref (pk_action);
 
-        if (!polkit_authorization_result_get_is_authorized (result)) {
+        if (pk_result != POLKIT_RESULT_YES) {
                 error = g_error_new (GNOME_CLOCK_APPLET_MECHANISM_ERROR,
                                      GNOME_CLOCK_APPLET_MECHANISM_ERROR_NOT_PRIVILEGED,
-                                     "Not Authorized for action %s", action);
+                                     "%s %s <-- (action, result)",
+                                     action,
+                                     polkit_result_to_string_representation (pk_result));
+                dbus_error_free (&dbus_error);
                 dbus_g_method_return_error (context, error);
                 g_error_free (error);
-                g_object_unref (result);
 
                 return FALSE;
         }
 
-        g_object_unref (result);
-
         return TRUE;
 }
 
@@ -556,60 +609,3 @@ gnome_clock_applet_mechanism_set_hardware_clock_using_utc  (GnomeClockAppletMech
         dbus_g_method_return (context);
         return TRUE;
 }
-
-static void
-check_can_do (GnomeClockAppletMechanism *mechanism,
-              const char                *action,
-              DBusGMethodInvocation     *context)
-{
-        const char *sender;
-        PolkitSubject *subject;
-        PolkitAuthorizationResult *result;
-
-        /* Check that caller is privileged */
-        sender = dbus_g_method_get_sender (context);
-        subject = polkit_system_bus_name_new (sender);
-
-        result = polkit_authority_check_authorization_sync (mechanism->priv->auth,
-                                                            subject,
-                                                            action,
-                                                            NULL,
-                                                            0,
-                                                            NULL, NULL);
-        g_object_unref (subject);
-
-        if (polkit_authorization_result_get_is_authorized (result)) {
-                dbus_g_method_return (context, 2);
-        }
-        else if (polkit_authorization_result_get_is_challenge (result)) {
-                dbus_g_method_return (context, 1);
-        }
-        else {
-                dbus_g_method_return (context, 0);
-        }
-
-        g_object_unref (result);
-}
-
-
-gboolean
-gnome_clock_applet_mechanism_can_set_time (GnomeClockAppletMechanism    *mechanism,
-                                           DBusGMethodInvocation        *context)
-{
-        check_can_do (mechanism,
-                      "org.gnome.clockapplet.mechanism.settime",
-                      context);
-
-        return TRUE;
-}
-
-gboolean
-gnome_clock_applet_mechanism_can_set_timezone (GnomeClockAppletMechanism    *mechanism,
-                                               DBusGMethodInvocation        *context)
-{
-        check_can_do (mechanism,
-                      "org.gnome.clockapplet.mechanism.settimezone",
-                      context);
-
-        return TRUE;
-}
diff --git a/applets/clock/gnome-clock-applet-mechanism.h b/applets/clock/gnome-clock-applet-mechanism.h
index 505c89a..90b8cf3 100644
--- a/applets/clock/gnome-clock-applet-mechanism.h
+++ b/applets/clock/gnome-clock-applet-mechanism.h
@@ -69,16 +69,10 @@ gboolean            gnome_clock_applet_mechanism_set_timezone (GnomeClockAppletM
                                                                const char                   *zone_file,
                                                                DBusGMethodInvocation        *context);
 
-gboolean            gnome_clock_applet_mechanism_can_set_timezone (GnomeClockAppletMechanism    *mechanism,
-                                                                   DBusGMethodInvocation        *context);
-
 gboolean            gnome_clock_applet_mechanism_set_time     (GnomeClockAppletMechanism    *mechanism,
                                                                gint64                        seconds_since_epoch,
                                                                DBusGMethodInvocation        *context);
 
-gboolean            gnome_clock_applet_mechanism_can_set_time (GnomeClockAppletMechanism    *mechanism,
-                                                               DBusGMethodInvocation        *context);
-
 gboolean            gnome_clock_applet_mechanism_adjust_time  (GnomeClockAppletMechanism    *mechanism,
                                                                gint64                        seconds_to_add,
                                                                DBusGMethodInvocation        *context);
diff --git a/applets/clock/gnome-clock-applet-mechanism.xml b/applets/clock/gnome-clock-applet-mechanism.xml
index eabc531..fb604f0 100644
--- a/applets/clock/gnome-clock-applet-mechanism.xml
+++ b/applets/clock/gnome-clock-applet-mechanism.xml
@@ -5,64 +5,10 @@
       <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
       <arg name="zonefile" direction="in" type="s"/>
     </method>
-    <method name="CanSetTimezone">
-      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
-      <arg name="value" direction="out" type="i">
-        <doc:doc>
-          <doc:summary>Whether the caller can set the timezone</doc:summary>
-          <doc:description>
-            <doc:para>
-              The return value is not a boolean, but an integer with the following meaning:
-              <doc:list>
-                <doc:item>
-                  <doc:term>0</doc:term>
-                  <doc:definition>the caller cannot set the timezone</doc:definition>
-                </doc:item>
-                <doc:item>
-                  <doc:term>1</doc:term>
-                  <doc:definition>the caller will be challenged before being able to set the timezone</doc:definition>
-                </doc:item>
-                <doc:item>
-                  <doc:term>2</doc:term>
-                  <doc:definition>the caller is authorized to set the timezone</doc:definition>
-                </doc:item>
-              </doc:list>
-            </doc:para>
-          </doc:description>
-        </doc:doc>
-      </arg>
-    </method>
     <method name="SetTime">
       <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
       <arg name="seconds_since_epoch" direction="in" type="x"/>
     </method>
-    <method name="CanSetTime">
-      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
-      <arg name="value" direction="out" type="i">
-        <doc:doc>
-          <doc:summary>Whether the caller can set the time</doc:summary>
-          <doc:description>
-            <doc:para>
-              The return value is not a boolean, but an integer with the following meaning:
-              <doc:list>
-                <doc:item>
-                  <doc:term>0</doc:term>
-                  <doc:definition>the caller cannot set the time</doc:definition>
-                </doc:item>
-                <doc:item>
-                  <doc:term>1</doc:term>
-                  <doc:definition>the caller will be challenged before being able to set the time</doc:definition>
-                </doc:item>
-                <doc:item>
-                  <doc:term>2</doc:term>
-                  <doc:definition>the caller is authorized to set the time</doc:definition>
-                </doc:item>
-              </doc:list>
-            </doc:para>
-          </doc:description>
-        </doc:doc>
-      </arg>
-    </method>
     <method name="AdjustTime">
       <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
       <arg name="seconds_to_add" direction="in" type="x"/>
diff --git a/applets/clock/org.gnome.clockapplet.mechanism.policy.in b/applets/clock/org.gnome.clockapplet.mechanism.policy.in
index 018e0b5..ecba073 100644
--- a/applets/clock/org.gnome.clockapplet.mechanism.policy.in
+++ b/applets/clock/org.gnome.clockapplet.mechanism.policy.in
@@ -13,7 +13,7 @@
     <_message>Privileges are required to change the system time zone.</_message>
     <defaults>
       <allow_inactive>no</allow_inactive>
-      <allow_active>auth_self_keep</allow_active>
+      <allow_active>auth_self_keep_always</allow_active>
     </defaults>
   </action>
 
@@ -22,7 +22,7 @@
     <_message>Privileges are required to change the system time.</_message>
     <defaults>
       <allow_inactive>no</allow_inactive>
-      <allow_active>auth_admin_keep</allow_active>
+      <allow_active>auth_self_keep_always</allow_active>
     </defaults>
   </action>
 
@@ -31,7 +31,7 @@
     <_message>Privileges are required to configure the hardware clock.</_message>
     <defaults>
       <allow_inactive>no</allow_inactive>
-      <allow_active>auth_admin_keep</allow_active>
+      <allow_active>auth_self_keep_always</allow_active>
     </defaults>
   </action>
 
diff --git a/applets/clock/set-timezone.c b/applets/clock/set-timezone.c
index 30dffc0..f2a5259 100644
--- a/applets/clock/set-timezone.c
+++ b/applets/clock/set-timezone.c
@@ -32,8 +32,31 @@
 #include <dbus/dbus-glib.h>
 #include <dbus/dbus-glib-lowlevel.h>
 
+#include <polkit/polkit.h>
+#include <polkit-dbus/polkit-dbus.h>
+
 #include "set-timezone.h"
 
+#define CACHE_VALIDITY_SEC 2
+
+static DBusGConnection *
+get_session_bus (void)
+{
+        GError          *error;
+        static DBusGConnection *bus = NULL;
+
+	if (bus == NULL) {
+        	error = NULL;
+        	bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
+        	if (bus == NULL) {
+               		g_warning ("Couldn't connect to session bus: %s", 
+				   error->message);
+                	g_error_free (error);
+        	}
+	}
+
+        return bus;
+}
 
 static DBusGConnection *
 get_system_bus (void)
@@ -54,96 +77,148 @@ get_system_bus (void)
         return bus;
 }
 
-#define CACHE_VALIDITY_SEC 2
-
-typedef  void (*CanDoFunc) (gint value);
-
-static void
-notify_can_do (DBusGProxy     *proxy,
-	       DBusGProxyCall *call,
-	       void           *user_data)
+static gboolean
+pk_io_watch_have_data (GIOChannel *channel, GIOCondition condition, gpointer user_data)
 {
-	CanDoFunc callback = user_data;
-	GError *error = NULL;
-	gint value;
-
-	if (dbus_g_proxy_end_call (proxy, call,
-				   &error,
-				   G_TYPE_INT, &value,
-				   G_TYPE_INVALID)) {
-		callback (value);
-	}
+        int fd;
+        PolKitContext *pk_context = user_data;
+        fd = g_io_channel_unix_get_fd (channel);
+        polkit_context_io_func (pk_context, fd);
+        return TRUE;
 }
 
-static void
-refresh_can_do (const gchar *action, CanDoFunc callback)
+static int 
+pk_io_add_watch_fn (PolKitContext *pk_context, int fd)
 {
-        DBusGConnection *bus;
-        DBusGProxy      *proxy;
+        guint id = 0;
+        GIOChannel *channel;
+        channel = g_io_channel_unix_new (fd);
+        if (channel == NULL)
+                goto out;
+        id = g_io_add_watch (channel, G_IO_IN, pk_io_watch_have_data, pk_context);
+        if (id == 0) {
+                g_io_channel_unref (channel);
+                goto out;
+        }
+        g_io_channel_unref (channel);
+out:
+        return id;
+}
 
-        bus = get_system_bus ();
-        if (bus == NULL)
-                return;
+static void 
+pk_io_remove_watch_fn (PolKitContext *pk_context, int watch_id)
+{
+        g_source_remove (watch_id);
+}
 
-	proxy = dbus_g_proxy_new_for_name (bus,
-					   "org.gnome.ClockApplet.Mechanism",
-					   "/",
-					   "org.gnome.ClockApplet.Mechanism");
+static PolKitContext *
+get_pk_context (void)
+{
+	static PolKitContext *pk_context = NULL;
+
+	if (pk_context == NULL) {
+		pk_context = polkit_context_new ();
+                polkit_context_set_io_watch_functions (pk_context,
+                                                       pk_io_add_watch_fn,
+                                                       pk_io_remove_watch_fn);
+		if (!polkit_context_init (pk_context, NULL)) {
+			polkit_context_unref (pk_context);
+			pk_context = NULL;
+		}
+	}
 
-	dbus_g_proxy_begin_call_with_timeout (proxy,
-					      action,
-					      notify_can_do,
-					      callback, NULL,
-					      INT_MAX,
-					      G_TYPE_INVALID);
+	return pk_context;
 }
 
-static gint   settimezone_cache = 0;
-static time_t settimezone_stamp = 0;
-
-static void
-update_can_settimezone (gint res)
+static gint
+can_do (const gchar *pk_action_id)
 {
-	settimezone_cache = res;
-	time (&settimezone_stamp);
+	DBusConnection *system_bus;
+	PolKitCaller *pk_caller;
+        PolKitAction *pk_action;
+        PolKitResult pk_result;
+	PolKitContext *pk_context;
+        DBusError dbus_error;
+	gint res = 0;
+
+        pk_caller = NULL;
+        pk_action = NULL;
+
+	system_bus = dbus_g_connection_get_connection (get_system_bus ());
+	if (system_bus == NULL)
+		goto out;
+	
+	pk_context = get_pk_context ();
+	if (pk_context == NULL)
+		goto out;
+	
+        pk_action = polkit_action_new ();
+        polkit_action_set_action_id (pk_action, pk_action_id);
+
+        dbus_error_init (&dbus_error);
+        pk_caller = polkit_caller_new_from_pid (system_bus, getpid (), &dbus_error);
+        if (pk_caller == NULL) {
+                fprintf (stderr, "cannot get caller from dbus name\n");
+                goto out;
+        }
+
+        pk_result = polkit_context_is_caller_authorized (pk_context, pk_action, pk_caller, FALSE, NULL);
+
+	switch (pk_result) {
+        case POLKIT_RESULT_UNKNOWN:
+        case POLKIT_RESULT_NO:
+ 		res = 0;
+		break;
+        case POLKIT_RESULT_YES:
+		res = 2;
+		break;
+        default:
+                /* This covers all the POLKIT_RESULT_ONLY_VIA_[SELF|ADMIN]_AUTH_* cases as more of these
+                 * may be added in the future.
+                 */
+		res = 1;
+		break;
+	}
+	
+out:
+        if (pk_action != NULL)
+                polkit_action_unref (pk_action);
+        if (pk_caller != NULL)
+                polkit_caller_unref (pk_caller);
+
+	return res;
 }
 
 gint
 can_set_system_timezone (void)
 {
+	static gboolean cache = FALSE;
+	static time_t   last_refreshed = 0;
 	time_t          now;
 
 	time (&now);
-	if (ABS (now - settimezone_stamp) > CACHE_VALIDITY_SEC) {
-		refresh_can_do ("CanSetTimezone", update_can_settimezone);
-		settimezone_stamp = now;
+	if (ABS (now - last_refreshed) > CACHE_VALIDITY_SEC) {
+		cache = can_do ("org.gnome.clockapplet.mechanism.settimezone");
+		last_refreshed = now;
 	}
 
-	return settimezone_cache;
-}
-
-static gint   settime_cache = 0;
-static time_t settime_stamp = 0;
-
-static void
-update_can_settime (gint res)
-{
-	settime_cache = res;
-	time (&settime_stamp);
+	return cache;
 }
 
 gint
 can_set_system_time (void)
 {
-	time_t now;
+	static gboolean cache = FALSE;
+	static time_t   last_refreshed = 0;
+	time_t          now;
 
 	time (&now);
-	if (ABS (now - settime_stamp) > CACHE_VALIDITY_SEC) {
-		refresh_can_do ("CanSetTime", update_can_settime);
-		settime_stamp = now;
+	if (ABS (now - last_refreshed) > CACHE_VALIDITY_SEC) {
+		cache = can_do ("org.gnome.clockapplet.mechanism.settime");
+		last_refreshed = now;
 	}
 
-	return settime_cache;
+	return cache;
 }
 
 typedef struct {
@@ -151,6 +226,7 @@ typedef struct {
         gchar *call;
 	gint64 time;
 	gchar *filename;
+        guint transient_parent_xid;
 	GFunc callback;
 	gpointer data;
 	GDestroyNotify notify;
@@ -170,6 +246,61 @@ free_data (gpointer d)
 	}
 }
 
+static void set_time_async (SetTimeCallbackData *data);
+
+static void 
+auth_notify (DBusGProxy     *proxy,
+             DBusGProxyCall *call,
+             void           *user_data)
+{
+	SetTimeCallbackData *data = user_data;
+	GError *error = NULL;
+	gboolean gained_privilege;
+
+	if (dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_BOOLEAN, &gained_privilege, G_TYPE_INVALID)) {
+		if (gained_privilege)
+			set_time_async (data);
+	}
+	else {
+		if (data->callback) 
+			data->callback (data->data, error);
+		else
+			g_error_free (error);
+	}
+}
+
+static void
+do_auth_async (const gchar         *action, 
+               const gchar         *result, 
+               SetTimeCallbackData *data)
+{
+        DBusGConnection *bus;
+	DBusGProxy *proxy;
+
+	g_debug ("helper refused; returned polkit_result='%s' and polkit_action='%s'",
+		 result, action);
+
+	/* Now ask the user for auth... */
+        bus = get_session_bus ();
+	if (bus == NULL)
+		return;
+
+	proxy = dbus_g_proxy_new_for_name (bus,
+					"org.gnome.PolicyKit",
+					"/org/gnome/PolicyKit/Manager",
+					"org.gnome.PolicyKit.Manager");
+	
+	data->ref_count++;
+	dbus_g_proxy_begin_call_with_timeout (proxy,
+					      "ShowDialog",
+					      auth_notify,
+					      data, free_data,
+					      INT_MAX,
+					      G_TYPE_STRING, action,
+					      G_TYPE_UINT, data->transient_parent_xid,
+					      G_TYPE_INVALID);
+}
+
 static void
 set_time_notify (DBusGProxy     *proxy,
 		 DBusGProxyCall *call,
@@ -193,6 +324,17 @@ set_time_notify (DBusGProxy     *proxy,
 			if (data->callback)
 				data->callback (data->data, NULL);
 		}
+		else if (dbus_g_error_has_name (error, "org.gnome.ClockApplet.Mechanism.NotPrivileged")) {
+			gchar **tokens;
+
+			tokens = g_strsplit (error->message, " ", 2);
+			g_error_free (error);                            
+			if (g_strv_length (tokens) == 2) 
+				do_auth_async (tokens[0], tokens[1], data);
+			else
+				g_warning ("helper return string malformed");
+			g_strfreev (tokens);
+		}
 		else {
 			if (data->callback)
 				data->callback (data->data, error);
@@ -244,8 +386,9 @@ set_time_async (SetTimeCallbackData *data)
 
 void
 set_system_time_async (gint64         time,
-		       GFunc          callback,
-		       gpointer       d,
+                       guint          transient_parent_xid,
+		       GFunc          callback, 
+		       gpointer       d, 
 		       GDestroyNotify notify)
 {
 	SetTimeCallbackData *data;
@@ -258,6 +401,7 @@ set_system_time_async (gint64         time,
 	data->call = "SetTime";
 	data->time = time;
 	data->filename = NULL;
+        data->transient_parent_xid = transient_parent_xid;
 	data->callback = callback;
 	data->data = d;
 	data->notify = notify;
@@ -268,9 +412,10 @@ set_system_time_async (gint64         time,
 
 void
 set_system_timezone_async (const gchar    *filename,
-			   GFunc           callback,
-			   gpointer        d,
-			   GDestroyNotify  notify)
+                           guint           transient_parent_xid,
+	             	   GFunc           callback, 
+		           gpointer        d, 
+		           GDestroyNotify  notify)
 {
 	SetTimeCallbackData *data;
 
@@ -282,6 +427,7 @@ set_system_timezone_async (const gchar    *filename,
 	data->call = "SetTimezone";
 	data->time = -1;
 	data->filename = g_strdup (filename);
+        data->transient_parent_xid = transient_parent_xid;
 	data->callback = callback;
 	data->data = d;
 	data->notify = notify;
diff --git a/applets/clock/set-timezone.h b/applets/clock/set-timezone.h
index 5280b07..db8f4ae 100644
--- a/applets/clock/set-timezone.h
+++ b/applets/clock/set-timezone.h
@@ -28,11 +28,13 @@ gint     can_set_system_timezone (void);
 gint     can_set_system_time     (void);
 
 void     set_system_time_async   (gint64         time,
+                                  guint          transient_parent_xid,
                                   GFunc          callback,
                                   gpointer       data,
                                   GDestroyNotify notify);
 
 void     set_system_timezone_async   (const gchar    *filename,
+                                      guint           transient_parent_xid,
                                       GFunc           callback,
                                       gpointer        data,
                                       GDestroyNotify  notify);
diff --git a/configure.in b/configure.in
index 5643b5e..2398652 100644
--- a/configure.in
+++ b/configure.in
@@ -130,21 +130,24 @@ PKG_CHECK_MODULES(CLOCK_MECHANISM, [ gthread-2.0 gio-2.0 dbus-glib-1 ])
 AC_SUBST(CLOCK_MECHANISM_CFLAGS)
 AC_SUBST(CLOCK_MECHANISM_LIBS)
 
-POLKIT_REQUIRED=0.91
+POLKIT_GNOME_REQUIRED=0.7
+POLKIT_DBUS_REQUIRED=0.7
 DBUS_GLIB_REQUIRED=0.71
 DBUS_REQUIRED=1.1.2
 NETWORK_MANAGER_REQUIRED=0.6
  
 # PolicyKit detection; defaults to 'auto' (use it if it's available)
 #
-POLKIT_CFLAGS=
-POLKIT_LIBS=
+POLKIT_GNOME_CFLAGS=
+POLKIT_GNOME_LIBS=
+POLKIT_DBUS_CFLAGS=
+POLKIT_DBUS_LIBS=
 AC_ARG_ENABLE(polkit, AS_HELP_STRING([--enable-polkit],[Enable PolicyKit support (auto)]),enable_polkit=$enableval,enable_polkit=auto)
 if test "x$enable_polkit" = "xno" ; then
   HAVE_POLKIT=no
 else
   HAVE_POLKIT=no
-  PKG_CHECK_MODULES(POLKIT, polkit-gobject-1 >= $POLKIT_REQUIRED dbus-1 >= $DBUS_REQUIRED, HAVE_POLKIT=yes, HAVE_POLKIT=no)
+  PKG_CHECK_MODULES(POLKIT_GNOME, polkit-gnome >= $POLKIT_GNOME_REQUIRED dbus-1 >= $DBUS_REQUIRED, HAVE_POLKIT=yes, HAVE_POLKIT=no)
  
   if test "x$enable_polkit" = "xyes" -a "x$HAVE_POLKIT" = "xno" ; then
     AC_MSG_ERROR(PolicyKit support explicity enabled but not available)
@@ -152,11 +155,16 @@ else
 
   if test "x$HAVE_POLKIT" = "xyes" ; then
     AC_DEFINE(HAVE_POLKIT, 1, [Defined if PolicyKit support is enabled])
+    PKG_CHECK_MODULES(POLKIT_DBUS, polkit-dbus >= $POLKIT_DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED gobject-2.0)
+    AC_CHECK_PROG([POLKIT_POLICY_FILE_VALIDATE],
+                  [polkit-policy-file-validate], [polkit-policy-file-validate])
   fi
 fi
 AM_CONDITIONAL(HAVE_POLKIT, test "x$HAVE_POLKIT" = "xyes")
-AC_SUBST(POLKIT_CFLAGS)
-AC_SUBST(POLKIT_LIBS)
+AC_SUBST(POLKIT_GNOME_CFLAGS)
+AC_SUBST(POLKIT_GNOME_LIBS)
+AC_SUBST(POLKIT_DBUS_CFLAGS)
+AC_SUBST(POLKIT_DBUS_LIBS)
 
 AC_ARG_ENABLE(network_manager, AS_HELP_STRING([--enable-network-manager],[Enable NetworkManager support (auto)]),enable_network_manager=$enableval,enable_network_manager=auto)
 if test "x$enable_network_manager" = "xno" ; then
