aboutsummaryrefslogtreecommitdiff
path: root/src/users-service-dbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/users-service-dbus.c')
-rw-r--r--src/users-service-dbus.c30
1 files changed, 22 insertions, 8 deletions
diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c
index 5d157ee..5b1bcd7 100644
--- a/src/users-service-dbus.c
+++ b/src/users-service-dbus.c
@@ -437,10 +437,17 @@ get_unix_user (UsersServiceDbus *service,
guint uid;
DBusGProxy *session_proxy;
- session_proxy = dbus_g_proxy_new_for_name(priv->system_bus,
- "org.freedesktop.ConsoleKit",
- session_id,
- "org.freedesktop.ConsoleKit.Session");
+ session_proxy = dbus_g_proxy_new_for_name_owner(priv->system_bus,
+ "org.freedesktop.ConsoleKit",
+ session_id,
+ "org.freedesktop.ConsoleKit.Session",
+ &error);
+
+ if (error != NULL) {
+ g_warning("Unable to get CK Session proxy: %s", error->message);
+ g_error_free(error);
+ return FALSE;
+ }
if (org_freedesktop_ConsoleKit_Session_get_unix_user(session_proxy, &uid, &error))
{
@@ -475,10 +482,17 @@ do_add_session (UsersServiceDbus *service,
DBusGProxy * session_proxy;
GList *l;
- session_proxy = dbus_g_proxy_new_for_name(priv->system_bus,
- "org.freedesktop.ConsoleKit",
- ssid,
- "org.freedesktop.ConsoleKit.Session");
+ session_proxy = dbus_g_proxy_new_for_name_owner(priv->system_bus,
+ "org.freedesktop.ConsoleKit",
+ ssid,
+ "org.freedesktop.ConsoleKit.Session",
+ &error);
+
+ if (error != NULL) {
+ g_warning("Unable to get CK Session proxy: %s", error->message);
+ g_error_free(error);
+ return FALSE;
+ }
seat = get_seat_internal (session_proxy);